|
From: <mi...@us...> - 2017-04-10 18:41:22
|
Revision: 8056
http://sourceforge.net/p/docutils/code/8056
Author: milde
Date: 2017-04-10 18:41:14 +0000 (Mon, 10 Apr 2017)
Log Message:
-----------
Document and update smartquotes.
Modified Paths:
--------------
trunk/docutils/docutils/utils/smartquotes.py
Added Paths:
-----------
trunk/docutils/docs/user/smartquotes.txt
Added: trunk/docutils/docs/user/smartquotes.txt
===================================================================
--- trunk/docutils/docs/user/smartquotes.txt (rev 0)
+++ trunk/docutils/docs/user/smartquotes.txt 2017-04-10 18:41:14 UTC (rev 8056)
@@ -0,0 +1,465 @@
+=========================
+Smart Quotes for Docutils
+=========================
+
+:Author: Günter Milde,
+ based on SmartyPants by John Gruber, Brad Choate, and Chad Miller
+:Contact: doc...@li...
+:Revision: $Revision$
+:Date: $Date$
+:License: Released under the terms of the `2-Clause BSD license`_
+:Abstract: This document describes the Docutils `smartquotes` module.
+
+.. _2-Clause BSD license: http://www.spdx.org/licenses/BSD-2-Clause
+
+.. contents::
+
+Description
+===========
+
+The `smart_quotes configuration setting`_ triggers the SmartQuotes
+transformation on Text nodes that includes the following steps:
+
+- Straight quotes (``"`` and ``'``) into "curly" quote characters
+- dashes (``--`` and ``---``) into en- and em-dash entities
+- three consecutive dots (``...`` or ``. . .``) into an ellipsis entity.
+
+This means you can write, edit, and save your documents using plain old
+ASCII---straight quotes, plain dashes, and plain dots---while Docutils
+generates documents with typographical quotes, dashes, and ellipses.
+
+Advantages:
+
+* typing speed (especiall when blind-typing),
+* the possibility to change the quoting style of the
+ complete document with just one configuration option, and
+* restriction to 7-bit characters in the source.
+
+However, there are `algorithmic shortcomings`_ for 2 reasons:
+
+* Dual use of the "ASCII-apostrophe" (') as single quote and apostrophe,
+* languages that do not use whitespace around words.
+
+So, please consider also
+`Why You Might Not Want to Use "Smart" Quotes in Your Documents`_.
+
+.. _smart_quotes configuration setting: config.html#smart-quotes
+
+
+Escaping
+========
+
+The `SmartQuotes` transform does not modify characters in literal text
+such as source code, maths, or literal blocks.
+
+If you need literal straight quotes (or plain hyphens and periods) in normal
+text, you can backslash escape the characters to preserve
+ASCII-punctuation. You need two backslashes as one backslash is removed by
+the reStructuredText `escaping mechanism`_.
+
+======== ========= ======== =========
+Escape Character Escape Character
+======== ========= ======== =========
+``\\`` \\ ``\\.`` \\.
+``\\"`` \\" ``\\-`` \\-
+``\\'`` \\' ``\\``` \\`
+======== ========= ======== =========
+
+This is useful, for example, when you want to use straight quotes as
+foot and inch marks: 6\\'2\\" tall; a 17\\" iMac.
+
+.. _escaping mechanism: ../ref/rst/restructuredtext.html#escaping-mechanism
+
+
+Localisation
+============
+
+Quotation marks have a `variety of forms`__ in different languages and
+media.
+
+`Smartquotes` selects quotation marks depending on the language of the current
+block element and the value of the `smart_quotes configuration setting`_.
+
+__ https://en.wikipedia.org/wiki/Quotation_mark#Summary_table
+
+Docutils' `smartquotes` support the following languages:
+
+
+.. class:: language-af
+
+"'Afrikaans' quotes"
+
+.. class:: language-af-x-altquot
+
+"'Afrikaans' alternative quotes"
+
+.. class:: language-ca
+
+"'Catalan' quotes"
+
+.. class:: language-ca-x-altquot
+
+"'Catalan' alternative quotes"
+
+.. class:: language-cs
+
+"'Czech' quotes"
+
+.. class:: language-cs-x-altquot
+
+"'Czech' alternative quotes"
+
+.. class:: language-da
+
+"'Danish' quotes"
+
+.. class:: language-da-x-altquot
+
+"'Danish' alternative quotes"
+
+.. class:: language-de
+
+"'German' quotes"
+
+.. class:: language-de-x-altquot
+
+"'German' alternative quotes"
+
+.. class:: language-de-ch
+
+"'Swiss-German' quotes"
+
+.. class:: language-el
+
+"'Greek' quotes"
+
+.. class:: language-en
+
+"'English' quotes"
+
+.. class:: language-en-uk-x-altquot
+
+"'British' alternative quotes"
+(swaps single and double quotes: ``"`` → ‘ and ``'`` → “)
+
+.. class:: language-eo
+
+"'Esperanto' quotes"
+
+.. class:: language-es
+
+"'Spanish' quotes"
+
+.. class:: language-es-x-altquot
+
+"'Spanish' alternative quotes"
+
+.. class:: language-et
+
+"'Estonian' quotes" (no secondary quote listed in Wikipedia)
+
+.. class:: language-et-x-altquot
+
+"'Estonian' alternative quotes"
+
+.. class:: language-eu
+
+"'Basque' quotes"
+
+.. class:: language-fi
+
+"'Finnish' quotes"
+
+.. class:: language-fi-x-altquot
+
+"'Finnish' alternative quotes"
+
+.. class:: language-fr
+
+"'French' quotes"
+
+.. class:: language-fr-x-altquot
+
+"'French' alternative quotes"
+
+.. class:: language-fr-ch
+
+"'Swiss-French' quotes"
+
+.. class:: language-fr-ch-x-altquot
+
+"'Swiss-French' alternative quotes" (narrow no-break space, see
+http://typoguide.ch/)
+
+.. class:: language-gl
+
+"'Galician' quotes"
+
+.. class:: language-he
+
+"'Hebrew' quotes"
+
+.. class:: language-he-x-altquot
+
+"'Hebrew' alternative quotes"
+
+.. class:: language-hr
+
+"'Croatian' quotes"
+
+.. class:: language-hr-x-altquot
+
+"'Croatian' alternative quotes"
+
+.. class:: language-hsb
+
+"'Upper Sorbian' quotes"
+
+.. class:: language-hsb-x-altquot
+
+"'Upper Sorbian' alternative quotes"
+
+.. class:: language-hu
+
+"'Hungarian' quotes"
+
+.. class:: language-is
+
+"'Icelandic' quotes"
+
+.. class:: language-it
+
+"'Italian' quotes"
+
+.. class:: language-it-ch
+
+"'Swiss-Italian' quotes"
+
+.. class:: language-it-x-altquot
+
+"'Italian' alternative quotes"
+
+.. class:: language-ja
+
+"'Japanese' quotes"
+
+.. class:: language-lt
+
+"'Lithuanian' quotes"
+
+.. class:: language-lv
+
+"'Latvian' quotes"
+
+.. class:: language-nl
+
+"'Dutch' quotes"
+
+.. class:: language-nl-x-altquot
+
+"'Dutch' alternative quotes"
+
+.. # 'nl-x-altquot2': u'””’’',
+
+.. class:: language-pl
+
+"'Polish' quotes"
+
+.. class:: language-pl-x-altquot
+
+"'Polish' alternative quotes"
+
+.. class:: language-pt
+
+"'Portuguese' quotes"
+
+.. class:: language-pt-br
+
+"'Portuguese (Brazil)' quotes"
+
+.. class:: language-ro
+
+"'Romanian' quotes"
+
+.. class:: language-ru
+
+"'Russian' quotes"
+
+.. class:: language-sh
+
+"'Serbo-Croatian' quotes"
+
+.. class:: language-sh-x-altquot
+
+"'Serbo-Croatian' alternative quotes"
+
+.. class:: language-sk
+
+"'Slovak' quotes"
+
+.. class:: language-sk-x-altquot
+
+"'Slovak' alternative quotes"
+
+.. class:: language-sl
+
+"'Slovenian' quotes"
+
+.. class:: language-sl-x-altquot
+
+"'Slovenian' alternative quotes"
+
+.. class:: language-sr
+
+"'Serbian' quotes"
+
+.. class:: language-sr-x-altquot
+
+"'Serbian' alternative quotes"
+
+.. class:: language-sv
+
+"'Swedish' quotes"
+
+.. class:: language-sv-x-altquot
+
+"'Swedish' alternative quotes"
+
+.. class:: language-tr
+
+"'Turkish' quotes"
+
+.. class:: language-tr-x-altquot
+
+"'Turkish' alternative quotes"
+
+.. 'tr-x-altquot2': u'“„‘‚', # antiquated?
+
+.. class:: language-uk
+
+"'Ukrainian' quotes"
+
+.. class:: language-uk-x-altquot
+
+"'Ukrainian' alternative quotes"
+
+.. class:: language-zh-cn
+
+"'Chinese (China)' quotes"
+
+.. class:: language-zh-tw
+
+"'Chinese (Taiwan)' quotes"
+
+Quotes in text blocks in a non-supported language use the document
+language:
+
+.. class:: langugage-undefined-example
+
+"'Undefined' quotes"
+
+
+Caveats
+=======
+
+Why You Might Not Want to Use "Smart" Quotes in Your Documents
+--------------------------------------------------------------
+
+For one thing, you might not care.
+
+Most normal, mentally stable individuals do not take notice of proper
+typographic punctuation. Many design and typography nerds, however, break
+out in a nasty rash when they encounter, say, a restaurant sign that uses
+a straight apostrophe to spell "Joe's".
+
+If you're the sort of person who just doesn't care, you might well want to
+continue not caring. Using straight quotes -- and sticking to the 7-bit
+ASCII character set in general -- is certainly a simpler way to live.
+
+Even if you *do* care about accurate typography, you still might want to
+think twice before "auto-educating" the quote characters in your documents.
+As there is always a chance that the algorithm gets it wrong, you may
+instead prefer to use the compose key or some other means to insert the
+correct Unicode characters into the source.
+
+
+Algorithmic Shortcomings
+------------------------
+
+The ASCII character (u0027 APOSTROPHE) is used for apostrophe and single
+quotes. If use inside a word, it is converted into an apostrophe:
+
+ .. class:: language-fr
+
+ Il dit : "C'est 'super' !"
+
+At the beginning or end of a word, it cannot be distinguished from a single
+quote by the algorithm.
+
+The `right single quotation mark`_ character -- used to close a secondary
+(inner) quote in English -- is also "the preferred character to use for
+apostrophe" (Unicode_). Therefore, "educating" works as expected for
+apostrophes at the end of a word, e.g.,
+
+ Mr. Hastings' pen; three days' leave; my two cents' worth.
+
+However, when apostrophes are used at the start of leading contractions,
+"educating" will turn the apostrophe into an *opening* secondary quote. In
+English, this is *not* the apostrophe character, e.g., ``'Twas brillig``
+is "miseducated" to
+
+ 'Twas brillig.
+
+In other locales (French, Italian, German, ...), secondary closing quotes
+differ from the apostrophe. A text like::
+
+ .. class:: language-de-CH
+
+ "Er sagt: 'Ich fass' es nicht.'"
+
+becomes
+
+ .. class:: language-de-CH
+
+ "Er sagt: 'Ich fass' es nicht.'"
+
+with a single closing guillemet in place of the apostrophe.
+
+In such cases, it's best to use the recommended apostrophe character (’) in
+the source:
+
+ | ’Twas brillig, and the slithy toves
+ | Did gyre and gimble in the wabe;
+ | All mimsy were the borogoves,
+ | And the mome raths outgrabe.
+
+.. _right single quotation mark:
+ http://www.fileformat.info/info/unicode/char/2019/index.htm
+.. _Unicode: http://www.unicode.org/charts/PDF/U2000.pdf
+
+History
+=======
+
+The smartquotes module is an adaption of "SmartyPants_" to Docutils.
+
+`John Gruber`_ did all of the hard work of writing this software in Perl for
+`Movable Type`_ and almost all of this useful documentation. `Chad Miller`_
+ported it to Python to use with Pyblosxom_.
+
+Portions of the SmartyPants original work are based on Brad Choate's nifty
+MTRegex plug-in. `Brad Choate`_ also contributed a few bits of source code to
+this plug-in. Brad Choate is a fine hacker indeed.
+`Jeremy Hedley`_ and `Charles Wiltgen`_ deserve mention for exemplary beta
+testing of the original SmartyPants.
+
+Internationalization and adaption to Docutils by Günter Milde.
+
+.. _SmartyPants: http://daringfireball.net/projects/smartypants/
+.. _Pyblosxom: http://pyblosxom.bluesock.org/
+.. _Movable Type: http://www.movabletype.org/
+.. _John Gruber: http://daringfireball.net/
+.. _Chad Miller: http://web.chad.org/
+.. _Brad Choate: http://bradchoate.com/
+.. _Jeremy Hedley: http://antipixel.com/
+.. _Charles Wiltgen: http://playbacktime.com/
+.. _Rael Dornfest: http://raelity.org/
Property changes on: trunk/docutils/docs/user/smartquotes.txt
___________________________________________________________________
Added: svn:eol-style
## -0,0 +1 ##
+native
\ No newline at end of property
Added: svn:keywords
## -0,0 +1 ##
+Author Date Id Revision
\ No newline at end of property
Modified: trunk/docutils/docutils/utils/smartquotes.py
===================================================================
--- trunk/docutils/docutils/utils/smartquotes.py 2017-04-06 13:10:34 UTC (rev 8055)
+++ trunk/docutils/docutils/utils/smartquotes.py 2017-04-10 18:41:14 UTC (rev 8056)
@@ -17,26 +17,26 @@
r"""
-========================
-SmartyPants for Docutils
-========================
+=========================
+Smart Quotes for Docutils
+=========================
Synopsis
========
-Smart-quotes for Docutils.
+"SmartyPants" is a free web publishing plug-in for Movable Type, Blosxom, and
+BBEdit that easily translates plain ASCII punctuation characters into "smart"
+typographic punctuation characters.
-The original "SmartyPants" is a free web publishing plug-in for Movable Type,
-Blosxom, and BBEdit that easily translates plain ASCII punctuation characters
-into "smart" typographic punctuation characters.
+``smartquotes.py`` is an adaption of "SmartyPants" to Docutils_.
-`smartypants.py`, endeavours to be a functional port of
-SmartyPants to Python, for use with Pyblosxom_.
+* Using Unicode characters instead of HTML entities for typographic quotes, it
+ works for any output format that supports Unicode.
+* Support `language specific quote characters`__.
-`smartquotes.py` is an adaption of Smartypants to Docutils_. By using Unicode
-characters instead of HTML entities for typographic quotes, it works for any
-output format that supports Unicode.
+__ http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks
+
Authors
=======
@@ -182,69 +182,51 @@
Options
=======
-For Pyblosxom users, the ``smartypants_attributes`` attribute is where you
-specify configuration options.
-
Numeric values are the easiest way to configure SmartyPants' behavior:
-"0"
- Suppress all transformations. (Do nothing.)
-"1"
- Performs default SmartyPants transformations: quotes (including
+:0: Suppress all transformations. (Do nothing.)
+
+:1: Performs default SmartyPants transformations: quotes (including
\`\`backticks'' -style), em-dashes, and ellipses. "``--``" (dash dash)
is used to signify an em-dash; there is no support for en-dashes
-"2"
- Same as smarty_pants="1", except that it uses the old-school typewriter
+:2: Same as smarty_pants="1", except that it uses the old-school typewriter
shorthand for dashes: "``--``" (dash dash) for en-dashes, "``---``"
(dash dash dash)
for em-dashes.
-"3"
- Same as smarty_pants="2", but inverts the shorthand for dashes:
+:3: Same as smarty_pants="2", but inverts the shorthand for dashes:
"``--``" (dash dash) for em-dashes, and "``---``" (dash dash dash) for
en-dashes.
-"-1"
- Stupefy mode. Reverses the SmartyPants transformation process, turning
+:-1: Stupefy mode. Reverses the SmartyPants transformation process, turning
the characters produced by SmartyPants into their ASCII equivalents.
- E.g. "“" is turned into a simple double-quote (\"), "—" is
- turned into two dashes, etc.
+ E.g. the LEFT DOUBLE QUOTATION MARK (“) is turned into a simple
+ double-quote (\"), "—" is turned into two dashes, etc.
The following single-character attribute values can be combined to toggle
individual transformations from within the smarty_pants attribute. For
-example, to educate normal quotes and em-dashes, but not ellipses or
-\`\`backticks'' -style quotes:
-
-E.g. ``py['smartypants_attributes'] = "1"`` is equivalent to
+example, ``py['smartypants_attributes'] = "1"`` is equivalent to
``py['smartypants_attributes'] = "qBde"``.
-"q"
- Educates normal quote characters: (") and (').
+:q: Educates normal quote characters: (") and (').
-"b"
- Educates \`\`backticks'' -style double quotes.
+:b: Educates \`\`backticks'' -style double quotes.
-"B"
- Educates \`\`backticks'' -style double quotes and \`single' quotes.
+:B: Educates \`\`backticks'' -style double quotes and \`single' quotes.
-"d"
- Educates em-dashes.
+:d: Educates em-dashes.
-"D"
- Educates em-dashes and en-dashes, using old-school typewriter shorthand:
+:D: Educates em-dashes and en-dashes, using old-school typewriter shorthand:
(dash dash) for en-dashes, (dash dash dash) for em-dashes.
-"i"
- Educates em-dashes and en-dashes, using inverted old-school typewriter
+:i: Educates em-dashes and en-dashes, using inverted old-school typewriter
shorthand: (dash dash) for em-dashes, (dash dash dash) for en-dashes.
-"e"
- Educates ellipses.
+:e: Educates ellipses.
-"w"
- Translates any instance of ``"`` into a normal double-quote character.
+:w: Translates any instance of ``"`` into a normal double-quote character.
This should be of no interest to most people, but of particular interest
to anyone who writes their posts using Dreamweaver, as Dreamweaver
inexplicably uses this entity to represent a literal double-quote
@@ -301,9 +283,9 @@
------------------------
One situation in which quotes will get curled the wrong way is when
-apostrophes are used at the start of leading contractions. For example:
+apostrophes are used at the start of leading contractions. For example::
-``'Twas the night before Christmas.``
+ 'Twas the night before Christmas.
In the case above, SmartyPants will turn the apostrophe into an opening
single-quote, when in fact it should be the `right single quotation mark`
@@ -402,13 +384,19 @@
apostrophe = u'’' # "’" RIGHT SINGLE QUOTATION MARK
# quote characters (language-specific, set in __init__())
- # http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks
- # http://de.wikipedia.org/wiki/Anf%C3%BChrungszeichen#Andere_Sprachen
- # https://fr.wikipedia.org/wiki/Guillemet
- # http://typographisme.net/post/Les-espaces-typographiques-et-le-web
- # http://www.btb.termiumplus.gc.ca/tpv2guides/guides/redac/index-fra.html
- # https://en.wikipedia.org/wiki/Hebrew_punctuation#Quotation_marks
- # http://www.tustep.uni-tuebingen.de/bi/bi00/bi001t1-anfuehrung.pdf
+ # [1] http://en.wikipedia.org/wiki/Non-English_usage_of_quotation_marks
+ # [2] http://de.wikipedia.org/wiki/Anf%C3%BChrungszeichen#Andere_Sprachen
+ # [3] https://fr.wikipedia.org/wiki/Guillemet
+ # [4] http://typographisme.net/post/Les-espaces-typographiques-et-le-web
+ # [5] http://www.btb.termiumplus.gc.ca/tpv2guides/guides/redac/index-fra.html
+ # [6] https://en.wikipedia.org/wiki/Hebrew_punctuation#Quotation_marks
+ # [7] http://www.tustep.uni-tuebingen.de/bi/bi00/bi001t1-anfuehrung.pdf
+ #
+ # TODO: configuration option, e.g.::
+ #
+ # smartquote-locales: nl: „“’’, # apostrophe for ``'s Gravenhage``
+ # nr: se, # alias
+ # fr: « : »:‹ : ›, # :-separated list with NBSPs
quotes = {'af': u'“”‘’',
'af-x-altquot': u'„”‚’',
'ca': u'«»“”',
@@ -415,8 +403,9 @@
'ca-x-altquot': u'“”‘’',
'cs': u'„“‚‘',
'cs-x-altquot': u'»«›‹',
- 'da': u'»«‘’',
+ 'da': u'»«›‹',
'da-x-altquot': u'„“‚‘',
+ # 'da-x-altquot2': u'””’’',
'de': u'„“‚‘',
'de-x-altquot': u'»«›‹',
'de-ch': u'«»‹›',
@@ -436,17 +425,19 @@
'fr-ch': u'«»‹›',
'fr-ch-x-altquot': (u'« ', u' »', u'‹ ', u' ›'), # narrow no-break space, http://typoguide.ch/
'gl': u'«»“”',
- 'he': u'”“»«',
- 'he-x-altquot': u'„”‚’',
- 'hr': u'„”‘’',
+ 'he': u'”“»«', # Hebrew is RTL, test position:
+ 'he-x-altquot': u'„”‚’', # low quotation marks are opening.
+ # 'he-x-altquot': u'“„‘‚', # RTL: low quotation marks opening
+ 'hr': u'„”‘’', # http://hrvatska-tipografija.com/polunavodnici/
'hr-x-altquot': u'»«›‹',
'hsb': u'„“‚‘',
'hsb-x-altquot':u'»«›‹',
'hu': u'„”«»',
+ 'is': u'„“‚‘',
'it': u'«»“”',
'it-ch': u'«»‹›',
'it-x-altquot': u'“”‘’',
- # 'it-x-altquot2': u'“„‘‚', # antiquated?
+ # 'it-x-altquot2': u'“„‘‚', # [7] antiquated?
'ja': u'「」『』',
'lt': u'„“‚‘',
'lv': u'„“‚‘',
@@ -454,23 +445,27 @@
'nl-x-altquot': u'„”‚’',
# 'nl-x-altquot2': u'””’’',
'pl': u'„”«»',
- 'pl-x-altquot': u'«»“”',
+ 'pl-x-altquot': u'«»‚’',
+ # 'pl-x-altquot2': u'„”‚’', # https://pl.wikipedia.org/wiki/Cudzys%C5%82%C3%B3w
'pt': u'«»“”',
'pt-br': u'“”‘’',
'ro': u'„”«»',
'ru': u'«»„“',
- 'sh': u'„”‚’',
+ 'sh': u'„”‚’', # Serbo-Croatian
'sh-x-altquot': u'»«›‹',
- 'sk': u'„“‚‘',
+ 'sk': u'„“‚‘', # Slovak
'sk-x-altquot': u'»«›‹',
+ 'sl': u'„“‚‘', # Slovenian
+ 'sl-x-altquot': u'»«›‹',
+ 'sq': u'«»‹›', # Albanian
+ 'sq-x-altquot': u'“„‘‚',
'sr': u'„”’’',
- 'sl': u'„“‚‘',
- 'sl-x-altquot': u'»«›‹',
+ 'sr-x-altquot': u'»«›‹',
'sv': u'””’’',
'sv-x-altquot': u'»»››',
'tr': u'“”‘’',
'tr-x-altquot': u'«»‹›',
- # 'tr-x-altquot2': u'“„‘‚', # antiquated?
+ # 'tr-x-altquot2': u'“„‘‚', # [7] antiquated?
'uk': u'«»„“',
'uk-x-altquot': u'„“‚‘',
'zh-cn': u'“”‘’',
@@ -921,8 +916,7 @@
print docstring_html
-
- # Unit test output goes out stderr.
+ # Unit test output goes to stderr.
import unittest
sp = smartyPants
@@ -931,17 +925,12 @@
def test_dates(self):
self.assertEqual(sp("1440-80's"), u"1440-80’s")
- self.assertEqual(sp("1440-'80s"), u"1440-‘80s")
- self.assertEqual(sp("1440---'80s"), u"1440–‘80s")
- self.assertEqual(sp("1960s"), "1960s") # no effect.
+ self.assertEqual(sp("1440-'80s"), u"1440-’80s")
+ self.assertEqual(sp("1440---'80s"), u"1440–’80s")
self.assertEqual(sp("1960's"), u"1960’s")
- self.assertEqual(sp("one two '60s"), u"one two ‘60s")
- self.assertEqual(sp("'60s"), u"‘60s")
+ self.assertEqual(sp("one two '60s"), u"one two ’60s")
+ self.assertEqual(sp("'60s"), u"’60s")
- def test_ordinal_numbers(self):
- self.assertEqual(sp("21st century"), "21st century") # no effect.
- self.assertEqual(sp("3rd"), "3rd") # no effect.
-
def test_educated_quotes(self):
self.assertEqual(sp('''"Isn't this fun?"'''), u'“Isn’t this fun?”')
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|