Skip to content

Commit

Permalink
[FIX] Enhance HTML comment matching
Browse files Browse the repository at this point in the history
  • Loading branch information
Domeshow committed Sep 18, 2024
1 parent a82d366 commit ca4c470
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/toastmark/src/commonmark/rawHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ATTRIBUTE = `${'(?:\\s+'}${ATTRIBUTENAME}${ATTRIBUTEVALUESPEC}?)`;
export const OPENTAG = `<${TAGNAME}${ATTRIBUTE}*\\s*/?>`;
export const CLOSETAG = `</${TAGNAME}\\s*[>]`;

const HTMLCOMMENT = '<!---->|<!--(?:-?[^>-])(?:-?[^-])*-->';
const HTMLCOMMENT = '<!-->|<!--->|<!--(?:[^-]|-[^-]|--[^>])*-->';
const PROCESSINGINSTRUCTION = '[<][?].*?[?][>]';
const DECLARATION = '<![A-Z]+\\s+[^>]*>';
const CDATA = '<!\\[CDATA\\[[\\s\\S]*?\\]\\]>';
Expand Down

0 comments on commit ca4c470

Please sign in to comment.