mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-09-08 05:46:05 +00:00
Keeping JSHint happy
This commit is contained in:
@@ -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([
|
||||
|
Reference in New Issue
Block a user