MCPcopy Index your code
hub / github.com/markdoc/markdoc / check

Function check

src/formatter.test.ts:84–91  ·  view source on GitHub ↗
(source, expected, options = {})

Source from the content-addressed store, hash-verified

82const tokenizer = new Markdoc.Tokenizer({ allowComments: true });
83
84function check(source, expected, options = {}) {
85 const a = expected?.trimStart();
86 const b = format(Markdoc.parse(tokenizer.tokenize(source)), options);
87 // console.log(a, b);
88 const d = diff(a, b);
89 if (d && d.includes('Compared values have no visual difference.')) return;
90 throw d;
91}
92
93function stable(source, options?) {
94 return check(source, source, options);

Callers 2

stableFunction · 0.85
formatter.test.tsFile · 0.85

Calls 2

formatFunction · 0.85
tokenizeMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…