Skip to content

Improve partial preprocessing #6

@ChrisWren

Description

@ChrisWren

The preprocessCode function is pretty weak at this point in time. It has very basic ways of discovering JavaScript partials and adding code around the partial so that the partial is considered valid when parsed by esprima.

To make this preprocessing effective, we have to count opening { and closing } to wrap the partial with a var declaration correctly. As of now, it simply discovers a partial and then wraps the whole code block, which will fail on any codeblock that has more code than a single partial in it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions