Skip to content

Commit bad1342

Browse files
committed
wip piece back frontmatter and pug
1 parent 43423b1 commit bad1342

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

src/printer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import matter = require('gray-matter');
1+
// import matter = require('gray-matter');
22
import type { BuiltInParserName, Options, RequiredOptions } from 'prettier';
33
import { format } from 'prettier';
44
import 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 {

0 commit comments

Comments
 (0)