Repository navigation
Conversation
TextProcessor.parse left the argument of \W, \T and \Q in the output, printed the letter of \L \l \O \o \K \k, and dropped the backslash of \S stacks while keeping their content verbatim. It now skips these codes, renders stacks as num/den, maps \~ to a space and \N to a line break, and stops at the end of the text when a terminating ';' is missing. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Member
|
Applied and pushed to Follow-up commit 2dc7e4e also routes font, color, height, and paragraph formatting through the safe terminator lookup, preventing those unterminated codes from restarting parsing indefinitely. Added regression coverage for missing terminators, escaped stack separators/semicolons, and unterminated stacks. Validation: full test suite passed (670 passed, 8 skipped); all 21 TextProcessor tests passed; Closing because the fix is now on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
MText.plainText(TextProcessor.parse) leaves several MTEXT inline format codes in the output:\C18;\c0;\FTimes New Roman Bold|b1|i0|c1;\H3.162892;\W1.000000;CAR PARKINGW1.000000;CAR PARKINGCAR PARKING{\W0.8;narrow} textW0.8;narrow textnarrow text\T1.1;track\Q15;obliqueT1.1;trackQ15;obliquetrackoblique1\S2^3;1S2^3;12/3\Lunder\l \Oover\oLunderl Ooverounder overChanges in
src/Text/TextProcessor.ts:\W,\T,\Qare skipped up to their;, like\A.\L \l \O \o \K \kare skipped.\Sstacks are rendered asnum/denfor the^,/and#separators (escaped separators stay literal).\~becomes a space,\N(column break) a line break._jumpreturns the end of the text when the;is missing, instead of0, which restarted parsing from the start and never terminated (e.g.text\A1).Tests:
tests/TextProcessor.test.tscovers each case above plus the existing\A/\H/\p/\Pbehaviour.npm test(631 passed, 16 skipped),npm run buildand eslint pass.The same gaps exist in ACadSharp's
TextProcessor.Parse(DomCR/ACadSharpsrc/ACadSharp/Text/TextProcessor.cs), so this is a fix on top of the upstream behaviour rather than a porting difference.🤖 Generated with Claude Code