-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
/
config.js
72 lines (65 loc) 路 1.51 KB
/
config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
export const isOsx = process.platform === 'darwin'
export const isWindows = process.platform === 'win32'
export const isLinux = process.platform === 'linux'
export const editorWinOptions = {
minWidth: 450,
minHeight: 220,
webPreferences: {
nodeIntegration: true,
webSecurity: false
},
useContentSize: true,
show: true, // Show the window after the app is ready.
frame: false,
titleBarStyle: 'hiddenInset',
zoomFactor: 1.0
}
export const preferencesWinOptions = {
width: 950,
height: 650,
webPreferences: {
nodeIntegration: true,
webSecurity: false
},
fullscreenable: false,
fullscreen: false,
resizable: false,
minimizable: false,
maximizable: false,
useContentSize: true,
show: true,
frame: false,
thickFrame: !isOsx,
titleBarStyle: 'hiddenInset',
zoomFactor: 1.0
}
export const PANDOC_EXTENSIONS = [
'html',
'docx',
'odt',
'latex',
'tex',
'ltx',
'rst',
'rest',
'org',
'wiki',
'dokuwiki',
'textile',
'opml',
'epub'
]
export const BLACK_LIST = [
'$RECYCLE.BIN'
]
export const EXTENSION_HASN = {
styledHtml: '.html',
pdf: '.pdf'
}
export const TITLE_BAR_HEIGHT = isOsx ? 21 : 32
export const LINE_ENDING_REG = /(?:\r\n|\n)/g
export const LF_LINE_ENDING_REG = /(?:[^\r]\n)|(?:^\n$)/
export const CRLF_LINE_ENDING_REG = /\r\n/
export const GITHUB_REPO_URL = 'https://github.com/marktext/marktext'
// copy from muya
export const URL_REG = /^http(s)?:\/\/([a-z0-9\-._~]+\.[a-z]{2,}|[0-9.]+|localhost|\[[a-f0-9.:]+\])(:[0-9]{1,5})?(\/[\S]+)?/i