@@ -32,18 +32,24 @@ marked.setOptions({
32
32
renderer : renderer ,
33
33
gfm : true ,
34
34
tables : true ,
35
- breaks : true ,
35
+ breaks : false ,
36
36
pedantic : false ,
37
37
sanitize : false ,
38
38
smartLists : true ,
39
39
smartypants : false ,
40
40
highlight : function ( code , lang , callback ) {
41
- if ( lang ) {
42
- return callback ( '' , highlight . highlight ( lang , code ) . value ) ;
43
- } else {
44
- return callback ( '' , highlight . highlightAuto ( code ) . value ) ;
45
- }
41
+ lang = lang ?lang :"bash" ;
42
+ return callback ( '' , highlight . highlight ( lang , code ) . value ) ;
46
43
}
44
+ // highlight: function (code, lang, callback) {
45
+ // if(lang){
46
+ // return highlight.highlight(lang,code).value;
47
+ // // return callback('',highlight.highlight(lang,code).value);
48
+ // }else{
49
+ // return highlight.highlightAuto(code).value;
50
+ // // return callback('',highlight.highlightAuto(code).value);
51
+ // }
52
+ // }
47
53
} ) ;
48
54
49
55
// 根目录
@@ -84,6 +90,7 @@ CreateDatajs('./.deploy/js/dt.js',function(dt_path,arr){
84
90
85
91
} )
86
92
93
+
87
94
// 监听实时编译
88
95
watch . watchTree ( path . join ( path . dirname ( __dirname ) , '/' ) , function ( f , curr , prev ) {
89
96
if ( typeof f == "object" && prev === null && curr === null ) {
@@ -159,7 +166,8 @@ function ReadTmpToHTML(from_path,to_path,md_path,des_json){
159
166
// 生成到指定目录
160
167
var new_to_path = path . join ( path . dirname ( __dirname ) , to_path ) ;
161
168
// 循环创建目录
162
- mkdirsSync ( path . dirname ( new_to_path ) ) ;
169
+ ! exists ( path . dirname ( new_to_path ) ) && mkdirsSync ( path . dirname ( new_to_path ) ) ;
170
+
163
171
if ( md_path ) {
164
172
var new_md_path = path . join ( path . dirname ( __dirname ) , md_path ) ;
165
173
var README_str = fs . readFileSync ( new_md_path ) ;
0 commit comments