tbranyen / combyne

A template engine that works the way you expect.
MIT License
144 stars 19 forks source link

fix regexs to deal with hard delimiters #53

Closed maxkorp closed 10 years ago

maxkorp commented 10 years ago

A few key changes here

johnhaley81 commented 10 years ago

I added a test inside of test/tests/lib/tokenParsing.js that this pull request needs to pass before it can be merged.

maxkorp commented 10 years ago

Tweaked it to look for literals first, which are presumed to be able to contain anything else. Nothing will break a literal value, not spaces or hard delimiters or anything else. Works for both double and single quoted strings

johnhaley81 commented 10 years ago

Some more test cases were added that need to be passed. The example case is a property that's inside of a string.

"{{ hello }} world" will always ignore the hello property

maxkorp commented 10 years ago

This needs a bigger refactor of the grammar and the tokenizer to deal with some of the "quirkier" scenarios (and some expected behaviors need to be defined). Creating an issue for this instead.