aboutsummaryrefslogtreecommitdiffstats
path: root/tests/extensions/extra
diff options
context:
space:
mode:
Diffstat (limited to 'tests/extensions/extra')
-rw-r--r--tests/extensions/extra/tables.html74
-rw-r--r--tests/extensions/extra/tables.txt31
2 files changed, 104 insertions, 1 deletions
diff --git a/tests/extensions/extra/tables.html b/tests/extensions/extra/tables.html
index a0b1f71..b81582c 100644
--- a/tests/extensions/extra/tables.html
+++ b/tests/extensions/extra/tables.html
@@ -284,4 +284,76 @@ Content Cell | Content Cell
<td><code>\</code></td>
</tr>
</tbody>
-</table> \ No newline at end of file
+</table>
+<p>Only the first backtick can be escaped</p>
+<table>
+<thead>
+<tr>
+<th>Escaped</th>
+<th>Bacticks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>`<code>\</code></td>
+<td>``</td>
+</tr>
+</tbody>
+</table>
+<p>Test escaped pipes</p>
+<table>
+<thead>
+<tr>
+<th>Column 1</th>
+<th>Column 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>|</code> |</td>
+<td>Pipes are okay in code and escaped. |</td>
+</tr>
+</tbody>
+</table>
+<table>
+<thead>
+<tr>
+<th>Column 1</th>
+<th>Column 2</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>row1</td>
+<td>row1 |</td>
+</tr>
+<tr>
+<td>row2</td>
+<td>row2</td>
+</tr>
+</tbody>
+</table>
+<p>Test header escapes</p>
+<table>
+<thead>
+<tr>
+<th><code>`\</code> |</th>
+<th><code>\</code> |</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td>row1</td>
+<td>row1</td>
+</tr>
+<tr>
+<td>row2</td>
+<td>row2</td>
+</tr>
+</tbody>
+</table>
+<p>Escaped pipes in format row should not be a table</p>
+<p>| Column1 | Column2 |
+| ------- || ------- |
+| row1 | row1 |
+| row2 | row2 |</p> \ No newline at end of file
diff --git a/tests/extensions/extra/tables.txt b/tests/extensions/extra/tables.txt
index a9677ba..d5bd6ea 100644
--- a/tests/extensions/extra/tables.txt
+++ b/tests/extensions/extra/tables.txt
@@ -90,3 +90,34 @@ Odd backticks | Even backticks
Escapes | More Escapes
------- | ------
`` `\`` | `\`
+
+Only the first backtick can be escaped
+
+Escaped | Bacticks
+------- | ------
+\`` \` | \`\`
+
+Test escaped pipes
+
+Column 1 | Column 2
+-------- | --------
+`|` \| | Pipes are okay in code and escaped. \|
+
+| Column 1 | Column 2 |
+| -------- | -------- |
+| row1 | row1 \|
+| row2 | row2 |
+
+Test header escapes
+
+| `` `\`` \| | `\` \|
+| ---------- | ---- |
+| row1 | row1 |
+| row2 | row2 |
+
+Escaped pipes in format row should not be a table
+
+| Column1 | Column2 |
+| ------- \|| ------- |
+| row1 | row1 |
+| row2 | row2 |