File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -127,7 +127,8 @@ function renderMain(html) {
127
127
// Template syntax, vueComponents, vueGlobalOptions
128
128
if ( docsifyConfig . vueGlobalOptions || vueComponentNames . length ) {
129
129
const reHasBraces = / { { 2 } [ ^ { } ] * } { 2 } / ;
130
- const reHasDirective = / \s v - ( b i n d : | c l o a k | e l s e | e l s e - i f = | f o r = | h t m l = | i f = | i s = | m o d e l = | o n : | o n c e | p r e | s h o w = | s l o t = | t e x t = ) / ;
130
+ const reHasDataDirective = / \s v - ( b i n d : | c l o a k | h t m l = | i s = | m o d e l = | o n : | s l o t = | t e x t = ) / ;
131
+ const reHasStaticDirective = / \s v - ( e l s e | e l s e - i f = | f o r = | i f = | o n c e | p r e | s h o w = ) / ;
131
132
132
133
vueMountData . push (
133
134
...dom
@@ -144,8 +145,11 @@ function renderMain(html) {
144
145
elm . querySelector ( vueComponentNames . join ( ',' ) || null ) ||
145
146
// has curly braces
146
147
reHasBraces . test ( elm . outerHTML ) ||
147
- // has directive
148
- reHasDirective . test ( elm . outerHTML ) ;
148
+ // has data directive
149
+ ( docsifyConfig . vueGlobalOptions &&
150
+ reHasDataDirective . test ( elm . outerHTML ) ) ||
151
+ // has static content directive
152
+ reHasStaticDirective . test ( elm . outerHTML ) ;
149
153
150
154
return isVueMount ;
151
155
} )
You can’t perform that action at this time.
0 commit comments