Fix logic around newline folding/escaping, since test data was being escaped more than expected.

This commit is contained in:
Tangent Wantwight 2023-07-27 21:08:34 -04:00
parent 1ee71e4ab8
commit ac8479bf61
2 changed files with 2 additions and 2 deletions

2
3x5.js
View file

@ -36,7 +36,7 @@ function renderCard(state, code) {
let theCard = {
id: 100,
fields: {},
code: `
code: String.raw`
h1 Hello, World!
para [2 + 2]
block {

View file

@ -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 */) {