Literate icon indicating copy to clipboard operation
Literate copied to clipboard

Unintentional equations in markdown

Open ghost opened this issue 2 years ago • 0 comments

2 $s between backticks in markdown on the same line results in an equation, which isn't really desired between backticks in markdown.

@s Unintentional equation

`$(FOO)` and `$(BAR)` are examples.

Results in:

...
<a name="1:1"><div class="section"><h4>1. Unintentional equation</h4></a>
<p><code>&lt;span class="math"&gt;(FOO)</code> and <code>&lt;/span&gt;(BAR)</code> are examples.
</p>
...

Where the <span/>s have been trapped inside <code/>s & are shown in the rendered HTML page like so:

1. Unintentional equation

<span class="math">(FOO) and </span>(BAR) are examples.

Escaping the use of $ does serve as a workaround, but needing escape sequences inside inline code spans in markdown is counter intuitive and not desired.

Would be ideal if $s inside matched backticks didn't indicate equations. Would also be fine for my use case if there was a way to turn off the equation processing too.

ghost avatar Apr 02 '22 23:04 ghost