mikeboers / PyHAML

Pythonic implementation of HAML, cross compiling to Mako template syntax.
BSD 3-Clause "New" or "Revised" License
97 stars 13 forks source link

Quotes in filter blocks should be ignored. #16

Closed startling closed 12 years ago

startling commented 12 years ago

Even inside some text in a block that should be filtered, single- and double-quotes are treated as significant.

This file, for example, fails because of the apostrophe/single-quote in "doesn't".

-! def whatever(x):
  return x

:whatever
  This doesn't work correctly because the apostrophe counts as an unclosed single-quote.

It gets me the following error:

mako.exceptions.SyntaxException: Unmatched ''' at line: 6 char: 91

It's a Mako error, but that file runs perfectly through vanilla Mako.

Thanks!

mikeboers commented 12 years ago

This works correctly since the new implementation of filters, which has not been pushed to PyPI.

mikeboers commented 12 years ago

I just pushed a new version to PyPI which should fix this.

startling commented 12 years ago

Thanks so much!