Fix logic around newline folding/escaping, since test data was being escaped more than expected.
This commit is contained in:
parent
1ee71e4ab8
commit
ac8479bf61
2 changed files with 2 additions and 2 deletions
2
3x5.js
2
3x5.js
|
@ -36,7 +36,7 @@ function renderCard(state, code) {
|
|||
let theCard = {
|
||||
id: 100,
|
||||
fields: {},
|
||||
code: `
|
||||
code: String.raw`
|
||||
h1 Hello, World!
|
||||
para [2 + 2]
|
||||
block {
|
||||
|
|
2
notcl.js
2
notcl.js
|
@ -15,7 +15,7 @@
|
|||
function parseNotcl(code) {
|
||||
/* Preprocess */
|
||||
// fold line endings
|
||||
code = code.replace(/(?<!\\)(\\\\)*\\n/g, "$1");
|
||||
code = code.replace(/(?<!\\)((\\\\)*)\\\n/g, "$1");
|
||||
|
||||
/* Parse */
|
||||
function nextWord(/* TODO: null/] terminator */) {
|
||||
|
|
Loading…
Reference in a new issue