Skip to content

Commit 58652f0

Browse files
committed
escape text within code block
1 parent 7f02d28 commit 58652f0

3 files changed

Lines changed: 17 additions & 1 deletion

File tree

render_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ func TestSimple(t *testing.T) {
8989

9090
func TestRender(t *testing.T) {
9191

92-
pairNames := []string{"ops1", "nested", "ordering", "list1", "list2", "list3", "list4", "indent", "code1", "code2"}
92+
pairNames := []string{"ops1", "nested", "ordering", "list1", "list2", "list3", "list4", "indent", "code1", "code2", "code3"}
9393

9494
for _, n := range pairNames {
9595
t.Run(n, func(t *testing.T) {

testdata/code3.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<pre>&lt;tag&gt;x&lt;/tag&gt;
2+
</pre><p>Stuff after code</p>

testdata/code3.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
[
2+
{
3+
"insert": "<tag>x</tag>"
4+
},
5+
{
6+
"insert": "\n",
7+
"attributes": {
8+
"code-block": true
9+
}
10+
},
11+
{
12+
"insert": "Stuff after code\n"
13+
}
14+
]

0 commit comments

Comments
 (0)