mdlint icon indicating copy to clipboard operation
mdlint copied to clipboard

Improve partial preprocessing

Open ChrisWren opened this issue 12 years ago • 0 comments

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.

ChrisWren avatar Aug 11 '13 18:08 ChrisWren