File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import matter = require( 'gray-matter' ) ;
1+ // import matter = require('gray-matter');
22import type { BuiltInParserName , Options , RequiredOptions } from 'prettier' ;
33import { format } from 'prettier' ;
44import type PrettierAngularPlugin from 'prettier/plugins/angular' ;
@@ -242,7 +242,7 @@ export class PugPrinter {
242242 private readonly content : string ,
243243 private tokens : Token [ ] ,
244244 private readonly options : PugPrinterOptions ,
245- private frontmatter : matter . GrayMatterFile < string > ,
245+ private frontmatter : Frontmatter < string > ,
246246 ) {
247247 this . frontmatter = frontmatter ;
248248 this . indentString = options . pugUseTabs
@@ -391,7 +391,10 @@ export class PugPrinter {
391391
392392 token = this . getNextToken ( ) ;
393393 }
394- return matter . stringify ( results . join ( '' ) , this . frontmatter . data ) ;
394+ console . log ( this . frontmatter ) ;
395+ //return matter.stringify(results.join(''), this.frontmatter.raw);
396+ console . log ( this . frontmatter ) ;
397+ return this . frontmatter . raw + results . join ( '' ) ;
395398 }
396399
397400 private getNextToken ( ) : Token | null {
You can’t perform that action at this time.
0 commit comments