Skip to content
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 section title including ".*" and without blank line after adornment characters wrongly renders as inline markup #9805

Closed
fireattack opened this issue May 26, 2024 · 0 comments
Labels

Comments

@fireattack
Copy link

fireattack commented May 26, 2024

Explain the problem.
This RST:

word.*word
------------
* abc

should be converted to an h2 heading with title "word.*word", and a bullet list of "abc".

However, it would be converted to (in MD, for example):

word.*word ------------* abc

which means it recognizes these two asterisks as inline markups.

You can "fix" it by adding a blank line after the ------------, but you shouldn't need to.

According to the spec, https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#sections

A blank line after a title is optional.

You can also "fix" it by removing . in front of * (i.e. change to word*word), but you shouldn't need to do this either; because this example does not match the rule for "inline markup recognition rule":
https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules

  1. Inline markup start-strings must start a text block or be immediately preceded by
    • whitespace,
    • one of the ASCII characters - : / ' " < ( [ {
    • or a similar non-ASCII punctuation character. [19]

As you can see, . (period) is NOT in the list of must-precede-the-markup list of characters (which are- : / ' " < ( [ { \s). Therefore, the first asterisk should NOT be recognized as markup, but literal asterisk.

Pandoc version?

3.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant