-
Notifications
You must be signed in to change notification settings - Fork 0
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
rst discussion for PR 17528 #673
Comments
Yes, a fair point, it's actually the main reason why I closed nim-lang#17528 Regarding
I'm hesitating to tell you, but recently I realized that actually there is a way in the original RST to render this correctly:
It works in rst2html.py because there is no whitespace after 2nd and 3rd The problem with that syntax is that it's very fragile. Add So our current interpretation of We almost conform with the letter and spirit of RST spec, because
(inline literals are double backticks) My current thoughts is that we should leave it as is. And don't implement escaping for |
good that we've converged to an agreement on this! nim-lang/RFCs#355 will solve all remaining cases where current escaping rules fall short, but this should be discussed in that rfc |
@a-mr I know you closed nim-lang#17528 but just wanted to clarify a few things before moving on
to clarify, these still don't work after this PR (neither trailing backtick nor trailing space):
give errors
furthermore, at least with rst2html and github, there is no good solution:
.. default-role:: code
, these would render as italics instead of as code, which is not what we want.. default-role:: code
, even existing single backtick snippets that don't require escaping (egfoo
) would not render well in github either, so we'd have to convert back all the single backticks to double backticks, reverting what we've been doing in the past few months (or, if only done in rst but not nim files, you'd have to remember to quote things differently in rst vs nim, which isn't good either eg when copy pasting etc).. default-role:: code
, the\
would be non-escaping so no possibility to escape backtick or single trailiing space etcyou wrote earlier:
note that it's not just rst2html, github also has this behavior
syntax highlighting
then there's the problem of syntax highlighting.
both rst2html and github render this:
with the non-escaping backlash, showing both the backslash and the backtick:
in the end, there is no good standard solution, hence RFCs/issues/355 which doesn't have any edge case and allows optional syntax highlighting wihtout requiring escaping.
The text was updated successfully, but these errors were encountered: