isaacs / sax-js

A sax style parser for JS
Other
1.1k stars 325 forks source link

position tracking is on by default (contrary to what's in Readme) #174

Open pirxpilot opened 8 years ago

pirxpilot commented 8 years ago

Readme claims that all options default to false:

opt - Object bag of settings regarding string formatting. All default to false.

However, if not specified, position tracking is on:

parser.trackPosition = parser.opt.position !== false

I'll gladly submit a patch, but should we fix the documentation, or the code?

isaacs commented 8 years ago

I'd say fix the documentation. Lower risk of breaking someone's program.