Open mfp22 opened 1 year ago
Actually this happens for any code snippet in a slide. No need to embed to reproduce issue.
In my testing, it looks like a single dollar sign per line is ok, backticks are added once the line has more than two dollars.
This bug affects me too, that's why I investigated some more...
The error is in this line:
The LatexProcessor
changes the content of any line containing a $
according to this regular expression: /\$(.*?)\$/g
is replaced with '$$$1$$'
, for example foo $bar$ baz
turns into foo '$bar$' baz
(in the replacement pattern, $$
is the escaped version of $
) . This code exists to support LaTeX math expressions in markdown, e.g.:
The circumference of a circle is $2\pi$.
But this is of course not intended within code blocks.
There used to be a (incorrect?) fix: https://github.com/MSzturc/obsidian-advanced-slides/commit/0e9af6215c0ed4991c4fba0cee2f82103c0d524a, which the author promptly reverted: https://github.com/MSzturc/obsidian-advanced-slides/commit/6ef4847.
Pull request for a fix https://github.com/MSzturc/obsidian-advanced-slides/pull/315
Describe the bug
I want to embed a code snippet from another file into a slide. It adds extra ticks `" near dollar signs $.
Samples to Reproduce
Try to embed this code snippet into a slide:
And it shows up exactly like this instead:
Expected behavior The embedded code should appear exactly the same in the slide