fix(publisher): make heading regex linear-time #2

Open
KofTwentyTwo wants to merge 1 commits from feature/security-findings-2026-10 into develop
pull from: feature/security-findings-2026-10
+2 -1
View File
@@ -49,7 +49,8 @@ export class MarkdownConverter {
const line = lines[i];
// Heading
const headingMatch = line.match(/^(#{1,6})\s+(.+)$/);
// `\s+(\S.*)` keeps the separator and the text disjoint, so matching is linear.
const headingMatch = line.match(/^(#{1,6})\s+(\S.*)$/);
if (headingMatch) {
tokens.push({
type: 'heading',