aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorIsaac Muse <faceless.shop@gmail.com>2017-01-11 09:19:06 -0700
committerWaylan Limberg <waylan.limberg@icloud.com>2017-01-11 11:19:06 -0500
commitdda33114ad36e2b1ca4d526f71787ba3414b9da7 (patch)
treeaa5d31597a69b3ac89fa0ab1119612f4adeede2a /tests
parentc10cfff946e17be7dedd39540ddad2241b1af292 (diff)
downloadmarkdown-dda33114ad36e2b1ca4d526f71787ba3414b9da7.tar.gz
markdown-dda33114ad36e2b1ca4d526f71787ba3414b9da7.tar.bz2
markdown-dda33114ad36e2b1ca4d526f71787ba3414b9da7.zip
Better handling of backticks in tables (#524)
At some point the logic of counting backticks and determining if they are odd or even was used to parse a row's text into cells. Unfortunately this approach broke expected code parsing logic in a table. We essentially traded one bug for another. This fixes table backtick handling and restores sane backtick logic while preserving existing fixes. (issue #449)
Diffstat (limited to 'tests')
-rw-r--r--tests/extensions/extra/tables.html31
-rw-r--r--tests/extensions/extra/tables.txt10
2 files changed, 40 insertions, 1 deletions
diff --git a/tests/extensions/extra/tables.html b/tests/extensions/extra/tables.html
index 85d9940..a0b1f71 100644
--- a/tests/extensions/extra/tables.html
+++ b/tests/extensions/extra/tables.html
@@ -255,4 +255,33 @@ Content Cell | Content Cell
<ul>
<li>this | should | not</li>
<li>be | a | table</li>
-</ul> \ No newline at end of file
+</ul>
+<p>Add tests for issue #449</p>
+<table>
+<thead>
+<tr>
+<th>Odd backticks</th>
+<th>Even backticks</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>[!\"\#$%&amp;'()*+,\-./:;&lt;=&gt;?@\[\\\]^_`{|}~]</code></td>
+<td><code>[!\"\#$%&amp;'()*+,\-./:;&lt;=&gt;?@\[\\\]^`_`{|}~]</code></td>
+</tr>
+</tbody>
+</table>
+<table>
+<thead>
+<tr>
+<th>Escapes</th>
+<th>More Escapes</th>
+</tr>
+</thead>
+<tbody>
+<tr>
+<td><code>`\</code></td>
+<td><code>\</code></td>
+</tr>
+</tbody>
+</table> \ No newline at end of file
diff --git a/tests/extensions/extra/tables.txt b/tests/extensions/extra/tables.txt
index c843918..a9677ba 100644
--- a/tests/extensions/extra/tables.txt
+++ b/tests/extensions/extra/tables.txt
@@ -80,3 +80,13 @@ Lists are not tables
- this | should | not
- be | a | table
+
+Add tests for issue #449
+
+Odd backticks | Even backticks
+------------ | -------------
+``[!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^_`{|}~]`` | ``[!\"\#$%&'()*+,\-./:;<=>?@\[\\\]^`_`{|}~]``
+
+Escapes | More Escapes
+------- | ------
+`` `\`` | `\`