Skip to content

Commit

Permalink
escape text within code block
Browse files Browse the repository at this point in the history
  • Loading branch information
dchenk committed Feb 7, 2020
1 parent 7f02d28 commit 58652f0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion render_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func TestSimple(t *testing.T) {

func TestRender(t *testing.T) {

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

for _, n := range pairNames {
t.Run(n, func(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions testdata/code3.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<pre>&lt;tag&gt;x&lt;/tag&gt;
</pre><p>Stuff after code</p>
14 changes: 14 additions & 0 deletions testdata/code3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[
{
"insert": "<tag>x</tag>"
},
{
"insert": "\n",
"attributes": {
"code-block": true
}
},
{
"insert": "Stuff after code\n"
}
]

0 comments on commit 58652f0

Please sign in to comment.