From cdbda3d4fc73a1889c15c26293340f10a955d657 Mon Sep 17 00:00:00 2001 From: Alex Rudenko Date: Mon, 19 May 2025 11:31:44 +0200 Subject: [PATCH] fix: do not show lint comments in the doc --- pages/domainGenerator.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/pages/domainGenerator.js b/pages/domainGenerator.js index 6544e95d2..47130f257 100644 --- a/pages/domainGenerator.js +++ b/pages/domainGenerator.js @@ -17,8 +17,11 @@ const itemSort = (a, b) => { // This handles a few weird cases of raw HTML or over-escaping in the protocol JSON function parseSafeMarkdown(mdText) { - // Inline codeblocks to doublecheck: IO.StreamHandle, Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId, Accessibility.AXValueSource > nativeSource - mdText = mdText.replaceAll('<', '<').replaceAll('>', '>'); + // Inline codeblocks to doublecheck: IO.StreamHandle, + // Preload.PreloadingAttemptSource, Preload.RuleSet > backendNodeId, + // Accessibility.AXValueSource > nativeSource. + // Replace LINT comments with an empty string. + mdText = mdText.replaceAll('<', '<').replaceAll('>', '>').replaceAll(/^LINT\..*$\n/gm, ''); const html = marked(mdText, {escape: true}); return html.replaceAll('&lt;', '<').replaceAll('&gt;', '>'); }