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

Quotes are sometimes rendered incorrectly #928

Closed
axelson opened this issue Nov 29, 2018 · 3 comments
Closed

Quotes are sometimes rendered incorrectly #928

axelson opened this issue Nov 29, 2018 · 3 comments

Comments

@axelson
Copy link
Contributor

axelson commented Nov 29, 2018

In the Phoenix 1.4.0 documentation we have the following snippet:

for example "room:*", "users:*", "system"

Which is rendered in html as “room:<em>“, “users:</em>”, “system”

Note that the second smart quote is "incorrect", which is possibly because the <em> tag was inserted between them, although I would expect that the quote after users: would have the same issue (abut maybe this is just a browser rendered oddity).

After looking at the generated code I'm not sure that this is necessarily an ex_doc issue since the documentation should either be escaping the \* or enclosing them in backticks. I will file a PR on Phoenix to fix the generated docs.

Also in my opinion, it would be better for ex_doc not to automatically convert double quote characters to smart quotes (but that's probably a different discussion)

Edit: Phoenix PR filed: phoenixframework/phoenix#3191

@josevalim
Copy link
Member

@axelson that's down to the markdown renderer. It is probably a configuration in earmark. Maybe we can just disable it.

@axelson
Copy link
Contributor Author

axelson commented Nov 29, 2018

@josevalim It looks like the configuration option in earmark is smartypants which is on by default and it Turns on smartypants processing, so quotes become curly, two or three hyphens become en and em dashes, and so on. True by default.

Ideally for ex_doc I think it would make sense to disable the smart quotes only (and I think that makes sense as an option for earmark) so I've raised an issue: pragdave/earmark#210

But possibly it makes sense to disable smartypants by default for ex_doc.

@josevalim
Copy link
Member

josevalim commented Nov 29, 2018 via email

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

No branches or pull requests

2 participants