mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-01-01 14:52:08 -08:00
Keeping JSHint happy
This commit is contained in:
parent
d87d180841
commit
12c6239bf5
1 changed files with 2 additions and 1 deletions
|
|
@ -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([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue