Vertical bars in mathematical expressions rendered as table separators
Describe the bug
Vertical bars in mathematical expressions are rendered as tables. Let's take for example the following markdown bit from one of my projects:
1. When $X$ is sorted, $M(X) = \min_{|Y|=|X|}\{M(Y)\}$. In other words, a measure of disorder *grows* with the amount of disorder in $X$, and reaches its minimum when $X$ is sorted.It kind of feels like a parser issue: it feels like whatever is inside $ or $$ blocks has lower priority than other markdown constructs, so the | has precedence for tables over the dollar sign for mathematical expressions.
To Reproduce Steps to reproduce the behavior:
- Write mathematical expressions with vertical bars.
- Run Gollum.
- Go to the appropriate page on localhost.
- See table instead of mathematical expression with bar.
I am running Gollum via docker with the following command line invocation:
docker run --rm -p 4567:4567 -v ~/cpp-sort:/wiki gollumwiki/gollum:master --page-file-dir docs --ref 2.x.y-develop --math katexFortunately there is a workaround: I can use \vert, \lvert and \rvert to display vertical bars correctly in mathematical expressions.
Expected behavior
I expect vertical bars within $ or $$ blocks to have precedence over vertical bars, getting them to be properly displayed as such in math expressions instead of being interpreted as table separators.
Screenshots
Environment Info
Result of gollum --versions:
Gollum 6.1.0
Running on: x86_64-linux-musl with Ruby version 3.3.9
Using:
rugged 1.9.0
gollum-rugged_adapter 3.0
gollum-lib 6.0
Markdown rendering gem: kramdown
Other rendering gems:
RedCloth 4.3.4
org-ruby 0.9.12
creole 0.5.0
asciidoctor 2.0.23
wikicloth 0.8.3Source: gollum/gollum