ox-rst icon indicating copy to clipboard operation
ox-rst copied to clipboard

Escaping '*' in verbatim blocks

Open dajva opened this issue 5 years ago • 0 comments

Thanks for a great package. In verbatim org blocks, consecutive * from start of the string becomes escaped when converting it to restrucured text. Examples:

=* foo *= -> ``\* foo *``
=** foo *= -> ``\*\* foo *``

What is the background if this behavior? I don't know restructured text very well but using sphinx to export it to other formats preserve the backslash. I'd like to have literal * in verbatim blocks but can't figure out how to do that.

Looking at the regexp in the code it confirms this behavior:

(string-match "\\`*" text)

I've been trying to avoid this issue by using this instead but not sure if it's what is intended:

(string-match "`+" text)

dajva avatar Oct 02 '19 16:10 dajva