jashkenas / underscore

JavaScript's utility _ belt
https://underscorejs.org
MIT License
27.33k stars 5.53k forks source link

Update docs w/info on how templateSettings overrides are prioritized #2866

Closed xdhmoore closed 4 years ago

xdhmoore commented 4 years ago

A coworker and I were stumped on why our template settings weren't working the the other day. This adds a line to the docs about how the template settings regexes are prioritized. For example, the default interpolation regex <%= etc %> matches a subset of the default evaluation regex <% etc %>, but if you switch those two regexes, things break because then the interpolation regex is prioritized and the evaluation regex never matches.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 96.263% when pulling d541039a3ce94974520480853f40cc093aca2be0 on xdhmoore:patch-2 into 977d4be74fe76227f5e9f3af9d640b46ab5b50dd on jashkenas:master.

coveralls commented 4 years ago

Coverage Status

Coverage remained the same at 96.263% when pulling 059612001d6d0b865aca7a0e1263d17ae8e85062 on xdhmoore:patch-2 into 977d4be74fe76227f5e9f3af9d640b46ab5b50dd on jashkenas:master.