Skip to content

Commit 270c2a3

Browse files
committed
update textarea contents
1 parent ea118ec commit 270c2a3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

index.html

+4-3
Original file line numberDiff line numberDiff line change
@@ -235,17 +235,18 @@ <h1>Try it online</h1>
235235
text += editor.getValue();
236236
text += '\n```\n';
237237
try {
238-
var ast = parser.parseCode(editor.getValue());
238+
var ast = parser.parseCode(editor.getValue());
239239
text += '\nAST Structure :\n';
240240
text += '```json\n';
241241
text += JSON.stringify(ast, null, 2);
242242
text += '\n```\n';
243-
} catch(e) {
243+
} catch(e) {
244244
text += '\nPHP Error :\n';
245245
text += '```\n';
246246
text += e.stack;
247247
text += '\n```\n';
248-
}
248+
}
249+
$out.val(text).focus();
249250
});
250251
editor.on("change", refreshAst);
251252
refreshAst();

0 commit comments

Comments
 (0)