1 Commits
Author SHA1 Message Date
james.maesandClaude Opus 5.5 2bc26fbdc5 fix(publisher): make heading regex linear-time
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-16 16:11:29 -05:00
+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',