Skip to content

Commit ab7c573

Browse files
authored
default allowComments: true in tokenizer (#26)
1 parent 2da8e24 commit ab7c573

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/loader.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ async function load(source) {
5252
dir, // Root directory from Next.js (contains next.config.js)
5353
mode = 'static',
5454
schemaPath = DEFAULT_SCHEMA_PATH,
55-
tokenizerOptions = undefined,
55+
tokenizerOptions = {allowComments: true},
5656
} = this.getOptions() || {};
5757

5858
const tokenizer = new Markdoc.Tokenizer(tokenizerOptions);

tests/__snapshots__/index.test.js.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {getSchema, defaultObject} from './src/runtime.js';
1313
*/
1414
const schema = {};
1515
16-
const tokenizer = new Markdoc.Tokenizer();
16+
const tokenizer = new Markdoc.Tokenizer({\\"allowComments\\":true});
1717
1818
/**
1919
* Source will never change at runtime, so parse happens at the file root
@@ -103,7 +103,7 @@ import {getSchema, defaultObject} from './src/runtime.js';
103103
*/
104104
const schema = {};
105105
106-
const tokenizer = new Markdoc.Tokenizer();
106+
const tokenizer = new Markdoc.Tokenizer({\\"allowComments\\":true});
107107
108108
/**
109109
* Source will never change at runtime, so parse happens at the file root

0 commit comments

Comments
 (0)