# ixml parser: skip a comment - #1230
Merged
larshp merged 1 commit intoSep 15, 2026
Merged
Conversation
A document that carries a comment did not parse: "<!--" enters the branch for a start or close tag, the tag regex does not match it and the parse dies in `ASSERT ls_match-offset = 0` - an assertion, so no CATCH cx_root absorbs it. The loop now takes a comment ahead of the tag branch and skips it as a whole, up to "-->". It carries no content, and what stands inside it is text - the tags of a commented-out element are never read as markup. Tests: a comment between two elements, one before the root element, one that contains markup, and one that is everything an element contains. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TKSWLpid4QLV6XWAoPixbb
oblomov-dev
force-pushed
the
claude/nifty-meitner-ema3y8-comment
branch
from
September 15, 2026 12:28
357627d to
d3b2e7e
Compare
This was referenced Sep 15, 2026
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.
What is wrong
A document that carries a comment does not parse.
<!--falls into the branchfor a start or close tag, where the tag regex does not match it:
so the parse ends in
ASSERTION_FAILED— an assertion, not an exception, sono
CATCH cx_rootaround the parse absorbs it:A comment sits in a hand-written or tool-generated document as a matter of
course — a header above the root element, a note next to a setting, an element
commented out — and none of those documents can be read at all today.
The change
The loop takes a comment ahead of the tag branch and skips it as a whole, up
to
-->:A comment carries no content, so it becomes no node — and what stands inside
it is text: the tags of a commented-out element are never read as markup. A
document without a comment is not touched, the new branch is only reached by
the literal
<!--.Tests
parse_comment— a comment between two elements, the first child of theroot is still the element
parse_comment_before_root— a comment between the prolog and the rootparse_comment_with_markup—<!-- <item>A</item> -->is text, theelement that follows is the one that is read
parse_comment_only_child— an element whose whole content is a comment hasno children
npm testis green:abaplint: 0 issue(s) found, 735 file(s) analyzed, andthe full unit run passes.