1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-02 12:19:11 +00:00

Keeping JSHint happy

This commit is contained in:
Jeremy Ruston 2012-03-02 18:00:40 +00:00
parent d87d180841
commit 12c6239bf5

View File

@ -22,8 +22,9 @@ var JavaScriptParser = function(options) {
// Parse a string of JavaScript code or JSON and return the parse tree as a wikitext parse tree
JavaScriptParser.prototype.parse = function(type,code) {
// Try to parse the code
var parseTree;
try {
var parseTree = esprima.parse(code,{comment: true,tokens: true,range: true});
parseTree = esprima.parse(code,{comment: true,tokens: true,range: true});
} catch(ex) {
// Return a helpful error if the parse failed
return new WikiTextParseTree([