You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
commenter: milde
posted: 2018-04-29 07:01:38.125000
title: #343 Smart quotes incorrectly converted before a link
This is actually a documented limitation of the "smartquotes" feature:
A single quote before a link is detected as a closing single quote.
The core problem is, that "smartquotes" cannot
distinguish a single quote from an apostrophe. You will see this also with
apostrophes at the end of a word, apostrophes inside a word if "smartquotes"
are activate because of escaped spaces, and with other inline markup.
This is masked in English because the single quote is converted to
RIGHT SINGLE QUOTATION MARK (’) and, according to the Unicode Standard,
"this is the preferred character to use for apostrophe".
As a result, smartquotes must be uses with special caution (or not at all)
with languages where the closing single quote glyph differs from the
apostrophe glyph.
Workarounds include:
a) disable smartquotes for languages where the closing single quote
differs from the apostrophe,
b) use literal Unicode character (bell’esempio) for apostrophe,
c) escape the ASCII APOSTROPHE character to prevent "education"
(bell'esempio).
d) set custom smart-quotes-locale with RIGHT SINGLE QUOTATION MARK (’) for
apostrophe and literal Unicode characters for single quotes,
IMO, workaround a) would be the safe thing to do for Sphinx.
commenter: milde
posted: 2018-04-29 07:02:13.385000
title: #343 Smart quotes incorrectly converted before a link
author: mapio
created: 2018-04-23 14:58:40.540000
assigned: None
SF_url: https://sourceforge.net/p/docutils/bugs/343
When converting something like
to HTML you get
where a smart quote takes the place of the single quote (that is the apostrophe, quite common in italian, for example).
This can be avoided if
smartquotes = False
is added to the configuration, in such case the conversion becomesas expected (and correct).
commenter: mapio
posted: 2018-04-23 15:00:25.479000
title: #343 Smart quotes incorrectly converted before a link
Please see sphinx-doc/sphinx#4864 (comment)
commenter: milde
posted: 2018-04-29 07:01:38.125000
title: #343 Smart quotes incorrectly converted before a link
This is actually a documented limitation of the "smartquotes" feature:
A single quote before a link is detected as a closing single quote.
The core problem is, that "smartquotes" cannot
distinguish a single quote from an apostrophe. You will see this also with
apostrophes at the end of a word, apostrophes inside a word if "smartquotes"
are activate because of escaped spaces, and with other inline markup.
This is masked in English because the single quote is converted to
RIGHT SINGLE QUOTATION MARK (’) and, according to the Unicode Standard,
"this is the preferred character to use for apostrophe".
As a result, smartquotes must be uses with special caution (or not at all)
with languages where the closing single quote glyph differs from the
apostrophe glyph.
Workarounds include:
a) disable smartquotes for languages where the closing single quote
differs from the apostrophe,
b) use literal Unicode character (bell’esempio) for apostrophe,
c) escape the ASCII APOSTROPHE character to prevent "education"
(bell'esempio).
d) set custom smart-quotes-locale with RIGHT SINGLE QUOTATION MARK (’) for
apostrophe and literal Unicode characters for single quotes,
IMO, workaround a) would be the safe thing to do for Sphinx.
commenter: milde
posted: 2018-04-29 07:02:13.385000
title: #343 Smart quotes incorrectly converted before a link
To see the limitation, test with e.g.::
rst2html5 --smart-quotes=alt --language=it
Quotes: "double", 'single', apostroph'
Inline markup:
bell'
esempio <http://example.net/>
_The same happens with other inline markup:
.. |subs| replace:: issima
bell'
name
, bell'emphasized, bel'literal
,bel'|subs|, bel':sup:
2
and with escaped spaces: bell'\ esempio
commenter: mapio
posted: 2018-04-29 22:04:50.834000
title: #343 Smart quotes incorrectly converted before a link
Thank you for your clarification; I've copied it also to the Sphinx bugtracker sphinx-doc/sphinx#4864 (comment)
commenter: milde
posted: 2018-04-30 06:33:18.037000
title: #343 Smart quotes incorrectly converted before a link
The text was updated successfully, but these errors were encountered: