mdlint
mdlint copied to clipboard
Improve partial preprocessing
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.