Skip to content

Commit

Permalink
Add new code-name AST test.
Browse files Browse the repository at this point in the history
  • Loading branch information
emmiegit committed May 5, 2024
1 parent 66913e8 commit b68e000
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
1 change: 1 addition & 0 deletions test/code-name.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<wj-body class="wj-body"><wj-code class="wj-code wj-language-none"><div class="wj-code-panel"><wj-code-copy type="button" class="wj-code-copy" title="Copy to Clipboard"><svg class="wj-sprite sprite-wj-clipboard" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard"></use></svg><svg class="wj-sprite sprite-wj-clipboard-success" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard-success"></use></svg></wj-code-copy><span class="wj-code-language"></span></div><pre><code>FOO</code></pre></wj-code><wj-code class="wj-code wj-language-none"><div class="wj-code-panel"><wj-code-copy type="button" class="wj-code-copy" title="Copy to Clipboard"><svg class="wj-sprite sprite-wj-clipboard" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard"></use></svg><svg class="wj-sprite sprite-wj-clipboard-success" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard-success"></use></svg></wj-code-copy><span class="wj-code-language"></span></div><pre><code>BAR</code></pre></wj-code><wj-code class="wj-code wj-language-java"><div class="wj-code-panel"><wj-code-copy type="button" class="wj-code-copy" title="Copy to Clipboard"><svg class="wj-sprite sprite-wj-clipboard" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard"></use></svg><svg class="wj-sprite sprite-wj-clipboard-success" viewBox="0 0 24 24"><use href="/files--static/media/ui.svg#wj-clipboard-success"></use></svg></wj-code-copy><span class="wj-code-language">java</span></div><pre><code>BAZ</code></pre></wj-code></wj-body>
59 changes: 59 additions & 0 deletions test/code-name.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"input": "[[code name=\"a\"]]\nFOO\n[[/code]]\n\n[[code]]\nBAR\n[[/code]]\n\n[[code name=\"b\" type=\"java\"]]\nBAZ\n[[/code]]",
"tree": {
"elements": [
{
"element": "code",
"data": {
"contents": "FOO",
"language": null
}
},
{
"element": "code",
"data": {
"contents": "BAR",
"language": null
}
},
{
"element": "code",
"data": {
"contents": "BAZ",
"language": "java"
}
},
{
"element": "footnote-block",
"data": {
"title": null,
"hide": false
}
}
],
"html-blocks": [
],
"code-blocks": [
{
"contents": "FOO",
"name": "a"
},
{
"contents": "BAR",
"name": null
},
{
"contents": "BAZ",
"name": "b"
}
],
"table-of-contents": [
],
"footnotes": [
],
"bibliographies": [
]
},
"errors": [
]
}
1 change: 1 addition & 0 deletions test/code-name.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

0 comments on commit b68e000

Please sign in to comment.