me: 1 documentation: 0

This commit is contained in:
kree 2026-08-06 20:36:15 -04:00
parent 435103a304
commit 43779e110a
2 changed files with 7 additions and 5 deletions

View file

@ -61,6 +61,10 @@ function _parse(text: string, root: Node): Node {
const j = open.pop()!; const j = open.pop()!;
textNode.endIndex = j; textNode.endIndex = j;
if (textNode.startIndex! > 0 && text.charAt(textNode.startIndex!) == '\n') {
textNode.startIndex!++;
}
textNode.text = text.substring(textNode.startIndex!, textNode.endIndex!) textNode.text = text.substring(textNode.startIndex!, textNode.endIndex!)
switch (scope.type) { switch (scope.type) {

View file

@ -41,7 +41,6 @@ Josie`;
const expected = const expected =
`Dear Aunt Mildred, `Dear Aunt Mildred,
It was a pleasure to see you at the wedding. It was a pleasure to see you at the wedding.
Thank you for the lovely bone china tea set. Thank you for the lovely bone china tea set.
@ -49,7 +48,6 @@ Best wishes,
Josie Josie
Dear Uncle John, Dear Uncle John,
It is a shame you couldn't make it to the wedding. It is a shame you couldn't make it to the wedding.
Thank you for the lovely moleskin pants. Thank you for the lovely moleskin pants.
@ -57,15 +55,15 @@ Best wishes,
Josie Josie
Dear Cousin Rodney, Dear Cousin Rodney,
It is a shame you couldn't make it to the wedding. It is a shame you couldn't make it to the wedding.
Best wishes, Best wishes,
Josie` Josie`
const actual = data.map(r => Gin.execute(template, r)).join('\n'); const actual = data.map(r => Gin.execute(template, r)).join('\n\n');
console.log(actual) console.debug(Gin.execute(template, data[0]))
expect(actual).toEqual(expected); expect(actual).toEqual(expected);
}) })
// it('parseGlob', async () => { // it('parseGlob', async () => {