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

Shortcodes with rst are broken #1904

Closed
fbeutel opened this issue Feb 28, 2016 · 3 comments
Closed

Shortcodes with rst are broken #1904

fbeutel opened this issue Feb 28, 2016 · 3 comments

Comments

@fbeutel
Copy link

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
Copy link
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
Copy link
Author

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 as completed in 7f682d7 Mar 1, 2016
bep added a commit that referenced this issue Mar 1, 2016
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
tychoish pushed a commit to tychoish/hugo that referenced this issue Aug 13, 2017
@github-actions
Copy link

github-actions bot commented Apr 9, 2022

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 9, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants