Changes the heading pattern to ^(#{1,6})\s+(\S.*)$ so the separator and the heading text cannot overlap (linear matching). Resolves code-scanning alert #1. A heading line that is only # plus whitespace is no longer treated as a heading with blank text.
Verification: converter compiles (no new tsc errors; the package's existing console lib errors in test-tree.ts are unrelated); a 50,000-space line matches in under 1 ms.
Fixes #1
Changes the heading pattern to `^(#{1,6})\s+(\S.*)$` so the separator and the heading text cannot overlap (linear matching). Resolves code-scanning alert #1. A heading line that is only `#` plus whitespace is no longer treated as a heading with blank text.
Verification: converter compiles (no new `tsc` errors; the package's existing `console` lib errors in test-tree.ts are unrelated); a 50,000-space line matches in under 1 ms.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Checking for merge conflicts…
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Fixes #1
Changes the heading pattern to
^(#{1,6})\s+(\S.*)$so the separator and the heading text cannot overlap (linear matching). Resolves code-scanning alert #1. A heading line that is only#plus whitespace is no longer treated as a heading with blank text.Verification: converter compiles (no new
tscerrors; the package's existingconsolelib errors in test-tree.ts are unrelated); a 50,000-space line matches in under 1 ms.🤖 Generated with Claude Code
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.