You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit eab1e48
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix: avoid quadratic scan for unmatched emphasis delimiters (#4103)
* fix: avoid quadratic scan for unmatched emphasis delimiters
Tokenizer.emStrong and del walked every later delimiter for each
unmatched opener, so parse time grew ~4x when those inputs doubled.
Cache the last possible closer on maskedSrc and skip the scan when
none remains after the opener.
Fixes#4099
Co-authored-by: David <[email protected]>
* fix: keep emphasis closer hints on the inline pass
Address review on the unmatched-delimiter scan: remove the timing unit
tests, cover mid-run openers in test/specs/new, name the emphasis and
strikethrough closer indexes, and drop the module-level maskedSrc cache.
Co-authored-by: David <[email protected]>
* refactor: scan unmatched emphasis closers in internal helpers
Tokenizer no longer gains public methods. The last-closer scan still
runs once per inline pass and the hint stack is dropped when that pass
ends, so the masked source is not retained.
Co-authored-by: David <[email protected]>
---------
Co-authored-by: David <[email protected]>
Co-authored-by: David <[email protected]>
Co-authored-by: Cursor Agent <[email protected]>
0 commit comments