Skip to content

OMeta parse errors get ignored by pybars3 #23

Description

@isaacdd

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions