fix: XML syntax annotations land on the error line - #6006
Open
Yahiro025 wants to merge 2 commits into
Open
Conversation
Restore the built-in XML worker and fix SAX locator mapping so gutter warnings/errors land on the line that contains the syntax problem, including multi-line tags and blank lines. Fixes ajaxorg#3479 Co-authored-by: Bennett Payoyo <Yahiro025@users.noreply.github.com>
Add locator assertions for the reporter’s query-tag (actual-single.gif) and later place-tag (actual.gif) extra-character-after-attribute cases. Co-authored-by: Bennett Payoyo <Yahiro025@users.noreply.github.com>
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.
Issue #, if available: Fixes #3479
Description of changes:
XML mode gutter errors/warnings were shown on the wrong line, especially with multi-line tags and blank lines.
Cause:
linePatternused.+, so blank lines were not counted.rowwithout converting to 0-based.<.Fix: Restore the in-tree XML worker (same approach as coffee/xquery workers) and:
.*instead of.+).locator.lineNumberto Ace 0-basedrow.worker-xmlfrom being overwritten when copyingace-legacy-lintersinto the build.Tests in
src/mode/xml_worker_test.jscover the kitchen-sink GIF cases and blank-line/multi-line cases.Note: aware that built-in linters may move toward ace-linters long-term; this keeps the in-tree worker correct while it remains used.
Drafted with Cursor (Grok); reviewed before opening.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Pull Request Checklist:
ace.d.ts) and its references.Open kitchen-sink @ b6a756acc90b4a59b82b523bf4b53bb0123c5a87