mirror of
https://github.com/yhirose/cpp-peglib.git
synced 2024-12-22 20:05:31 +00:00
Fixed problem with PEG Playground when grammar or code text is empty
This commit is contained in:
parent
57f866c6ca
commit
bbeadfa937
@ -1,12 +1,12 @@
|
|||||||
// Setup editros
|
// Setup editros
|
||||||
const grammar = ace.edit("grammar-editor");
|
const grammar = ace.edit("grammar-editor");
|
||||||
grammar.setShowPrintMargin(false);
|
grammar.setShowPrintMargin(false);
|
||||||
grammar.setValue(localStorage.getItem('grammarText'));
|
grammar.setValue(localStorage.getItem('grammarText') || '');
|
||||||
grammar.moveCursorTo(0, 0);
|
grammar.moveCursorTo(0, 0);
|
||||||
|
|
||||||
const code = ace.edit("code-editor");
|
const code = ace.edit("code-editor");
|
||||||
code.setShowPrintMargin(false);
|
code.setShowPrintMargin(false);
|
||||||
code.setValue(localStorage.getItem('codeText'));
|
code.setValue(localStorage.getItem('codeText') || '');
|
||||||
code.moveCursorTo(0, 0);
|
code.moveCursorTo(0, 0);
|
||||||
|
|
||||||
const codeAst = ace.edit("code-ast");
|
const codeAst = ace.edit("code-ast");
|
||||||
|
Loading…
Reference in New Issue
Block a user