Skip to content

Commit cdbda3d

Browse files
committed
fix: do not show lint comments in the doc
1 parent c6e6a8b commit cdbda3d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

pages/domainGenerator.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@ const itemSort = (a, b) => {
1717

1818
// This handles a few weird cases of raw HTML or over-escaping in the protocol JSON
1919
function parseSafeMarkdown(mdText) {
20-
// Inline codeblocks to doublecheck: IO.StreamHandle, Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId, Accessibility.AXValueSource > nativeSource
21-
mdText = mdText.replaceAll('<', '&lt;').replaceAll('>', '&gt;');
20+
// Inline codeblocks to doublecheck: IO.StreamHandle,
21+
// Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId,
22+
// Accessibility.AXValueSource > nativeSource.
23+
// Replace LINT comments with an empty string.
24+
mdText = mdText.replaceAll('<', '&lt;').replaceAll('>', '&gt;').replaceAll(/^LINT\..*$\n/gm, '');
2225
const html = marked(mdText, {escape: true});
2326
return html.replaceAll('&amp;lt;', '&lt;').replaceAll('&amp;gt;', '&gt;');
2427
}

0 commit comments

Comments
 (0)