Skip to content

Feat/comment handling#18

Merged
u8array merged 3 commits into
mainfrom
feat/comment-handling
May 6, 2026
Merged

Feat/comment handling#18
u8array merged 3 commits into
mainfrom
feat/comment-handling

Conversation

@u8array
Copy link
Copy Markdown
Owner

@u8array u8array commented May 6, 2026

No description provided.

u8array added 3 commits May 6, 2026 17:30
Hand-written ZPL often splits a logical comment across several ^FX
lines before the field they describe. Previously each ^FX overwrote
the pending comment, so only the last line reached the imported
object. Accumulate them with newline separators; XA/XZ still reset
at label boundaries.
^FX has no ^FH escape mechanism, so ^ or ~ inside comment text
terminates the command and corrupts the surrounding ZPL. Strip them at
the comment input so the user sees what will be saved, and keep the
strip in the generator as a safety net. The previous output strip only
covered ^; ~ would still break the structure.
`tsc --noEmit` (used pre-commit) and `tsc -b` (used in build) disagree
on whether array index access on `objects` returns T|undefined. The
build config has noUncheckedIndexedAccess on; match the existing
optional-chaining pattern used elsewhere in this file.
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a utility to sanitize ZPL command characters from free-form text and improves the ZPL parser to support multi-line comments by accumulating consecutive ^FX lines. It also adds comprehensive unit tests for the new comment parsing logic and integrates the sanitization utility into the properties panel and ZPL generator. I have no feedback to provide.

@u8array u8array merged commit 9f3cdba into main May 6, 2026
2 checks passed
@u8array u8array deleted the feat/comment-handling branch May 6, 2026 15:48
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