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

Add line, column, and index numbers to nodes #90

Merged
merged 1 commit into from
Apr 6, 2018
Merged

Conversation

andrejewski
Copy link
Owner

@andrejewski andrejewski commented Apr 5, 2018

Fixes #89

This adds the start and end positions of nodes to the parsed output if specified by the new parse option includePositions: true, which by default is false.

Existing programs will be unaffected as this is an opt-in feature. However, there are a couple of bug fixes that these changes brought to light, which should benefit everyone.

One reason for the opt-in nature of this feature is the increased size of output. I know some developers store parsed HTML output for later processing and their current programs would not benefit from the position information and 2x storage costs is not ideal.

The demo page now has includePositions and strip white-space toggles.

Repository owner deleted a comment from coveralls Apr 5, 2018
@andrejewski andrejewski merged commit a7f8ade into master Apr 6, 2018
@andrejewski andrejewski deleted the position branch June 18, 2018 03:22
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.

Incude line and column info from the original file
1 participant