@@ -32,7 +32,7 @@ function extractFragmentContent(text, fragment, fullLine) {
3232 return stripIndent ( ( match || [ ] ) [ 1 ] || '' ) . trim ( ) ;
3333}
3434
35- function walkFetchEmbed ( { embedTokens, compile, fetch } , cb ) {
35+ function walkFetchEmbed ( { embedTokens, compile, fetch, frontMatter } , cb ) {
3636 if ( ! embedTokens . length ) {
3737 return cb ( { } ) ;
3838 }
@@ -62,9 +62,9 @@ function walkFetchEmbed({ embedTokens, compile, fetch }, cb) {
6262 } ) ;
6363
6464 // This may contain YAML front matter and will need to be stripped.
65- const frontMatterInstalled = $docsify ?. frontMatter ?. installed ;
65+ const frontMatterInstalled = frontMatter ?. installed ;
6666 if ( frontMatterInstalled ) {
67- text = $docsify . frontMatter ?. parseMarkdown ( text ) ;
67+ text = frontMatter ?. parseMarkdown ( text ) ;
6868 }
6969
7070 if ( currentToken . embed . fragment ) {
@@ -140,6 +140,7 @@ export function prerenderEmbed({ compiler, raw = '', fetch }, done) {
140140 }
141141
142142 const compile = compiler . _marked ;
143+ const frontMatter = compiler . config . frontMatter ;
143144 let tokens = compile . lexer ( raw ) ;
144145 const embedTokens = [ ] ;
145146 const links = tokens . links ;
@@ -203,7 +204,7 @@ export function prerenderEmbed({ compiler, raw = '', fetch }, done) {
203204 const moves = [ ] ;
204205 const tokenInsertState = new WeakMap ( ) ;
205206 walkFetchEmbed (
206- { compile, embedTokens, fetch } ,
207+ { compile, embedTokens, fetch, frontMatter } ,
207208 ( { embedToken, token, rowIndex, cellIndex, tokenRef } ) => {
208209 if ( token && embedToken ) {
209210 Object . assign ( links , embedToken . links ) ;
0 commit comments