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

Shortcodes with rst are broken #1904

Closed
fbeutel opened this Issue Feb 28, 2016 · 2 comments

Comments

Projects
None yet
2 participants
@fbeutel

fbeutel commented Feb 28, 2016

When using restructuredText, the rst2html tool converts the @ sign into the HTML entity code @.
Apparently that screws up the shortcode mechanism in hugo.

I'm not sure if there is a way to tell rst2html to stop doing that (I didn't find any such options), but if not then probably the simplest thing to do would be to adapt the shortcode replacement code to look for @ instead of @

@bep bep added the Bug label Feb 28, 2016

@bep

This comment has been minimized.

Show comment
Hide comment
@bep

bep Feb 29, 2016

Member

The @ sign is just picked by random, it can be anything, but the replacement function is hand-coded for pure speed, so it should ideally be a one-byte character and not 5 ... What does RST not encode?

Member

bep commented Feb 29, 2016

The @ sign is just picked by random, it can be anything, but the replacement function is hand-coded for pure speed, so it should ideally be a one-byte character and not 5 ... What does RST not encode?

@fbeutel

This comment has been minimized.

Show comment
Hide comment
@fbeutel

fbeutel Mar 1, 2016

A quick test showed that the following characters are not being encoded, at least when using no special settings and using docutils version 0.12:
? + _ # ~ - / ! § $ % = ° :

Plenty to choose from :)

fbeutel commented Mar 1, 2016

A quick test showed that the following characters are not being encoded, at least when using no special settings and using docutils version 0.12:
? + _ # ~ - / ! § $ % = ° :

Plenty to choose from :)

@bep bep closed this in 7f682d7 Mar 1, 2016

bep added a commit that referenced this issue Mar 1, 2016

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

tychoish added a commit to tychoish/hugo that referenced this issue Aug 13, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment