Download Latest Version Source Positions.zip (118.0 kB)
Email in envelope

Get an email when there's a new version of Himalaya

Home / v1.1.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2018-04-06 1.0 kB
Source Positions.tar.gz 2018-04-06 110.9 kB
Source Positions.zip 2018-04-06 118.0 kB
Totals: 3 Items   229.9 kB 0

This minor release adds a new parse option includePositions. This is an opt-in feature that when set to true will cause himalaya.parse to emit nodes with a position field, containing start and end points. These points contain the zero-indexed index, line, and column numbers.

See this feature in the README example, the new spec section, and the updated demo page.

See the PR [#90] and issue [#89] for more information. Currently the position data is limited to only nodes so attributes and tag names do not have associated information, but this may be added later.

Note: this change did uncover some bugs that were fixed as well.

Thanks to @lazarljubenovic for making the issue for this idea. I'm excited to see what it enables, and am very happy to see it implemented so easily and incorporated into tests so well.

Source: README.md, updated 2018-04-06