backslide
backslide copied to clipboard
C++ lambda in code gets garbled in export
Hello
Let's have a presentation with this slide:
# The Code
```cpp
use_lambda([&]() { return 42; });
```
(that's a syntax for lambda in C++)
If I do bs serve
, everything is fine. But if I do bs export
and then open the generated html, the code gets changed to this:
use_lambda([&](file:///home/vorner/pres/) { return 42; });
(and everything starting with the tripple slash turns into a gray comment, but that would be correct if such text actually was part of C++ code).
I think something is confused about that [&]()
sequence, which is a bit link-like. If I put a space before the parentheses ([&] ()
), everything is fine.
I'm using backslide 2.3.7, on Linux.
I think it's the regex update for markdown links that got merged some times ago that may be flawed, it should not catch empty links anyway and should avoid anything in-between triple backticks. If you're willing to put a PR for the fix I'll gladly merge it, otherwise I have an almost complete rewrite of the tool in the pipe (long overdue though...) that should address all of these issues.
Sorry, I'm afraid javascript is not my language :-(