Skip to content

rtf: single-pass prelude scan; cap group nesting depth - #47

Open
jackoconner45 wants to merge 1 commit into
firecrawl:mainfrom
jackoconner45:rtf-single-pass-prelude
Open

rtf: single-pass prelude scan; cap group nesting depth#47
jackoconner45 wants to merge 1 commit into
firecrawl:mainfrom
jackoconner45:rtf-single-pass-prelude

Conversation

@jackoconner45

@jackoconner45 jackoconner45 commented Aug 6, 2026

Copy link
Copy Markdown

RTF previously lexed the input five times just for the prelude and codepage; one scan now extracts both (~23% faster on a 4.5 MB RTF).

Group nesting depth was unbounded; it now caps at MAX_RTF_DEPTH (256) with a ResourceLimit error.

All tests pass; snapshot output unchanged.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant