refactor(text): parse single-line ATTRIB text via acadrust
Route single-line attribute text through the same acad_text_encode path TEXT uses (acadrust parse_plain_text, re-encoded for the stroke tessellator). Multi-line attributes already flow through layout_mtext (acadrust). No visible change — attribute text with %% codes rendered correctly before via the local tokenizer; this shares the one parser. TOLERANCE cells and complex-linetype text still use the local tokenizer (specialized paths that rarely carry %% codes). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
a561b088d2
commit
1709d41e4f
2 changed files with 5 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ pub struct TextPlacement {
|
|||
/// inline grammar: specials arrive resolved to Unicode, and `%%u`/`%%o`
|
||||
/// underline/overline become `\L…\l` / `\O…\o` decoration markers. This keeps
|
||||
/// TEXT parsing in acadrust rather than OCS's own tokenizer.
|
||||
fn acad_text_encode(value: &str) -> String {
|
||||
pub(crate) fn acad_text_encode(value: &str) -> String {
|
||||
use acadrust::entities::mtext_format::parse_plain_text;
|
||||
let doc = parse_plain_text(value);
|
||||
let mut out = String::new();
|
||||
|
|
|
|||
Loading…
Reference in a new issue