diff --git a/docs/demo/demo.css b/docs/demo/demo.css index 66b870adad..92d2f4a504 100644 --- a/docs/demo/demo.css +++ b/docs/demo/demo.css @@ -45,10 +45,6 @@ header h1 { box-sizing: border-box; } -#options { - resize: both; -} - .pane, .inputPane { margin-top: 5px; padding: 0.6em; @@ -65,3 +61,8 @@ header h1 { #preview iframe { flex-grow: 1; } + +#options.badParse { + border-color: red; + background-color: #FEE +} diff --git a/docs/demo/demo.js b/docs/demo/demo.js index 09b30dc204..7da5fe3b9a 100644 --- a/docs/demo/demo.js +++ b/docs/demo/demo.js @@ -181,7 +181,9 @@ function checkForChanges() { var optionsString = $optionsElem.value || '{}'; var newOptions = JSON.parse(optionsString); options = newOptions; + $optionsElem.classList.remove('badParse'); } catch (err) { + $optionsElem.classList.add('badParse'); } var lexed = marked.lexer($markdownElem.value, options);