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

empty inlines are not valid RST syntax #4434

Closed
danse opened this issue Mar 7, 2018 · 2 comments
Closed

empty inlines are not valid RST syntax #4434

danse opened this issue Mar 7, 2018 · 2 comments

Comments

@danse
Copy link
Contributor

danse commented Mar 7, 2018

from RST inline markup recognition rules:

The inline markup end-string must be separated by at least one character from the start-string

this means that an empty inline will lead to an RST syntax error:

$ pandoc -f native -t rst | tee /tmp/out | rst2html > /dev/null; cat /tmp/out
Plain [Str "text", Strong []]
<stdin>:1: (WARNING/2) Inline strong start-string without end-string.
<stdin>:1: (WARNING/2) Inline strong start-string without end-string.
hi\ ****

i think that it's preferable to simply drop empty inlines so that they leave no track in the output file. note that empty inlines could come directly empty from the input document or become empty after stripping spaces because of #4329

@jgm
Copy link
Owner

jgm commented Mar 7, 2018 via email

danse added a commit to italia/pandoc that referenced this issue Mar 9, 2018
danse added a commit to italia/pandoc that referenced this issue Mar 9, 2018
jgm pushed a commit that referenced this issue Mar 18, 2018
jgm pushed a commit that referenced this issue Mar 18, 2018
There is nothing in RST that corresponds to e.g. `Emph []`, so we just filter out elements like this.
@jgm
Copy link
Owner

jgm commented Mar 18, 2018

Closed by ba965d1

@jgm jgm closed this as completed Mar 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants