-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Backslashes preceded by spaces wrongly doubled when converting from Dokuwiki to reStructedText #8178
Comments
Simpler demonstration of the phenomenon:
|
Here's what I see with docutils'
gets converted to
and
to
Finally,
gets converted to
So it seems we should be doubling all literal escape characters. I no longer remember why the code does something fancier:
|
My guess is that you want it to be single backslash both times, because (I assume) this is a representation of LaTeX math in dokuwiki? So maybe a second issue is that the dokuwiki reader should be taught to recognize it as such. Can you link to official documentation of this syntax? |
Previously we didn't escape it when it is word-internal, but that seems wrong. See #8178.
In fact, I'm using |
Indeed.
Would be nice.
I'm not sure to understand what you want: an official documentation for the Dokuwiki or the reStructedText side?
|
Yes, for dokuwiki. Sounds like this syntax is from an optional plugin, not part of the core syntax? That may be why it's not supported. |
Indeed.
I can understand. But, anyway, why backslashes are treated differently, depending on whether they are preceded by spaces (doubled) or not (not doubled)? |
As noted above, that's an issue with the RST writer. However, it has been fixed in the commit linked above. |
If this is a widely used plugin, I'm open to supporting it, because I don't think this syntax would be likely to appear with another meaning. |
I don't know if the one used in the Dokuwiki site I'm trying to convert to Sphinx-doc is widely used and I must admit it is rather old (last updated on 2011-04-29).
Thanks! But see above.
Indeed. |
Well, please remove a doubt from my mind: does this fix make the RST writer:
the backslashes? |
always double (see above) |
Sigh... This will be very harmful when converting to RST files that contain TeX commands that always start with a backslash, very often preceded by a space. |
As I explained, this requires that the dokuwiki reader recognize the special TeX math contexts in which backslashes behave differently. Currently the reader does not, because it's not part of core dokuwiki syntax. |
OK, thanks for the clarification. AFAICS, the only LaTeX Dokuwiki's plugin is LaTeX Plugin, despite its oldness. Considering its syntax, the ideal would be to not double backslashes:
|
Explain the problem.
In the output of:
backslashes preceded by spaces are wrongly doubled:
BTW, no such issue when the string is converted from
dokuwiki
toorg
:Pandoc version?
The text was updated successfully, but these errors were encountered: