Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMeta parse errors get ignored by pybars3 #23

Closed
isaacdd opened this issue Nov 7, 2015 · 10 comments
Closed

OMeta parse errors get ignored by pybars3 #23

isaacdd opened this issue Nov 7, 2015 · 10 comments

Comments

@isaacdd
Copy link
Collaborator

isaacdd commented Nov 7, 2015

To reproduce:

>> from pybars import Compiler
>> compiler = Compiler()
>> text = "{{#test}}a{{/#test}}"
>> compiler.compile(unicode(text))
<function render at 0x275f2a8>  # no error reported here

After inspecting the parse error, it seems that OMeta only reports the position, but None for the error.

>> tree, error = compiler._handlebars(text).apply('template')
>>> error
ParseError(13, None)

I think a parse error should be raised whenever the parse position is less than the length of the string.

@isaacdd isaacdd changed the title No parse error raised for closing tags OMeta parse errors get ignored by pybars3 Nov 7, 2015
@dagnelies
Copy link

+1

@isaacdd
Copy link
Collaborator Author

isaacdd commented Sep 13, 2016

@dagnelies This has been fixed in this fork: https://github.com/DataDog/pybars3 with this PR (DataDog#1).

@wbond
Copy link
Owner

wbond commented Sep 13, 2016

@isaacdd Are you interested in having access to this repo and the project on PyPi? I'm too overcommitted with stuff right now to keep up with this.

@isaacdd
Copy link
Collaborator Author

isaacdd commented Sep 13, 2016

@wbond Thanks! I would be interested in that.

@wbond
Copy link
Owner

wbond commented Sep 13, 2016

@isaacdd Do you have a PyPi username?

@isaacdd
Copy link
Collaborator Author

isaacdd commented Sep 13, 2016

@wbond it is isadaqah.

@wbond
Copy link
Owner

wbond commented Sep 13, 2016

Ok, all set on GitHub and PyPi. Thanks for helping out!

@tomgross
Copy link

If you do a release can you include the other PR #19 #20 and #21 too, please?

@isaacdd
Copy link
Collaborator Author

isaacdd commented Sep 18, 2016

Fixed with 0.9.2.

@isaacdd isaacdd closed this as completed Sep 18, 2016
@dagnelies
Copy link

great, thanks @isaacdd !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants