summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Bridle <ben@derelict.engineering>2026-06-14 14:32:56 +1200
committerBen Bridle <ben@derelict.engineering>2026-06-14 14:32:56 +1200
commit60cb53cafeece862cd0a7a2f8dce1f6e102cea94 (patch)
treef94315ad0237787523d29de8a4052a7e09bb3995
parente8d8a1146de5e297dda3dd6264a02f9d6938c3e1 (diff)
downloadmarkdown-60cb53cafeece862cd0a7a2f8dce1f6e102cea94.zip
Only detect monospace elements in pipe-avoiding table cell parser
This is a hacky fix to allow me to use the dollar sign as a regular character inside table cells. The pipe character will realistically only be used inside monospace elements anyway.
-rw-r--r--src/table.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/table.rs b/src/table.rs
index bfd9177..59f6ae7 100644
--- a/src/table.rs
+++ b/src/table.rs
@@ -75,10 +75,8 @@ fn split_columns(line: &str) -> Option<Vec<(String, bool)>> {
for c in head.chars() {
if Some(c) == context {
context = None;
- } else if Some(c) == context {
- context = None;
} else if context.is_none() {
- if "$`*_".contains(c) {
+ if c == '`' {
context = Some(c);
} else if c == '|' && context.is_none() {
if !cell.is_empty() {