-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmagic.config.js
36 lines (34 loc) · 941 Bytes
/
magic.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
module.exports= (() => ({
PluginTitle:'Magic Md to Html',
Version:'0.0.1',
Def_Encode:'utf8',
OutFileSuffix:'.html',
TagLabelRegex:/<tag[^><]*label="([^"]*?)"[^><]*>/,
TitleRegex:/<h[1-3][^><]*>(.+)<\/h[1-3]>/g, // 匹配全部 /<h\d[^><]*[^><]*>(.+)<\/h\d>/g
TitleContentRegex:/"\s*>(.*)<\/h\d>/,
ToCTag:'<ToC>',
TemplateDef:{
Meta:'{{meta}}',
Author:'{{author}}',
Description:'{{description}}',
Css:'{{cssHref}}',
Title:'{{title}}',
Content:'{{content}}',
ExtraScript:'{{extraScript}}',
Footer:'{{footer}}'
},
Def_Config_format:{
debugMode:false,
buildTemplate:false,
enableToC:false,
templatePath:'',
cssFilePath:'',
extraScriptPath:'',
footerPath:'',
markedOptions:{},
metaInfo:{
author:'',
copyright:''
}
}
}) )();