Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #593: support line numbers (5.x edition) #729

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

srl295
Copy link

@srl295 srl295 commented Feb 28, 2025

  • add a new symbol, accessible via XMLParser.getStartIndexSymbol() which reflects the start index of a tag
  • copy that start index in the compressed form as well
  • Same as fix #593: support line numbers #728 except targetting the 5.x line

Purpose / Goal

For our XML based parser, we want to show the line number of where an errant XML element was found.

This PR adds a symbol to objects in the output tree with the start index (in chars) of the element.

Fixes #593

Type

Please mention the type of PR

  • Bug Fix
  • Refactoring / Technology upgrade
  • New Feature

Benchmark

(TBD)

Bookmark this repository for further updates.

- add a new symbol, accessible via XMLParser.getStartIndexSymbol() which reflects the start index of a tag
- copy that start index in the compressed form as well

(cherry picked from commit d7601c3)
@srl295
Copy link
Author

srl295 commented Feb 28, 2025

Tests fail as they don't expect the symbols to be present.
This may be another argument for a configuration option to request the symbols.

Tests passed on the 4.x version, perhaps a change in Jasmine now fails.

srl295 added a commit to keymanapp/keyman that referenced this pull request Feb 28, 2025
@srl295 srl295 mentioned this pull request Feb 28, 2025
3 tasks
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.

Feature Request: Allow including node metadata (startIndex) in output
1 participant