Simplify context implementation and fix new lines bug

This commit is contained in:
Thomas Pelletier
2021-03-31 09:57:19 -04:00
parent 4a4c2c2a5f
commit 92b16cad91
2 changed files with 53 additions and 22 deletions
+22
View File
@@ -121,6 +121,28 @@ before `, "highlighted", ``},
10| line3
11| before highlighted
| ~~~~~~~~~~~ this is wrong
`,
},
{
desc: "handle empty lines in the before/after blocks",
doc: [3]string{`line1
line 2
before `, "highlighted", ` after
line 3
line 4
line 5`,
},
expected: `
1| line1
2|
3| line 2
4| before highlighted after
| ~~~~~~~~~~~
5| line 3
6|
7| line 4
`,
},
}