'\" t .\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "SMARTYPANTS" "1" "Jun 21, 2026" "2.0" "smartypants" .SH NAME smartypants \- smartypants Documentation .sp Contents: .SH INTRODUCTION .sp smartypants \% is a Python fork of SmartyPants \%\&. .sp smartypants can perform the following transformations: .INDENT 0.0 .IP \(bu 2 Straight quotes (\fB\(dq\fP and \fB\(aq\fP) into “curly” quote HTML entities .IP \(bu 2 Backticks\-style quotes (\fB\(ga\(galike this\(aq\(aq\fP) into “curly” quote HTML entities .IP \(bu 2 Dashes (\fB\-\-\fP and \fB\-\-\-\fP) into en\- and em\-dash entities .IP \(bu 2 Three consecutive dots (\fB\&...\fP or \fB\&. . .\fP) into an ellipsis entity .UNINDENT .sp This means you can write, edit, and save your posts using plain old ASCII straight quotes, plain dashes, and plain dots, but your published posts (and final HTML output) will appear with smart quotes, em\-dashes, and proper ellipses. .sp smartypants does not modify contents in some HTML element, see Skipped HTML Elements \%<#\:skip-html>\&. Typically, these tags are used to display text where smart quotes and other \(dqsmart punctuation\(dq would not be appropriate, such as source code or example markup. .SS Quick usage .sp To use it as a module: .INDENT 0.0 .INDENT 3.5 .sp .EX import smartypants text = \(aq\(dqSmartyPants\(dq is smart, so is smartypants \-\- a Python port\(aq print(smartypants.smartypants(text)) .EE .UNINDENT .UNINDENT .sp To use the command\-line script \fBsmartypants\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX echo \(aq\(dqSmartyPants\(dq is smart, so is smartypants \-\- a Python port\(aq | smartypants .EE .UNINDENT .UNINDENT .sp Both produce: .INDENT 0.0 .INDENT 3.5 .sp .EX “SmartyPants” is smart, so is smartypants — a Python port .EE .UNINDENT .UNINDENT .SS Installation .sp smartypants package on PyPI \% can be installed via \fBpip\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX python \-m pip install smartypants .EE .UNINDENT .UNINDENT .sp If you want to install latest development code, you can run: .INDENT 0.0 .INDENT 3.5 .sp .EX python \-m pip install git+https://github.com/justinmayer/smartypants.py .EE .UNINDENT .UNINDENT .SH USAGE .sp Typically, you import \fBsmartypants\fP \%<#\:module-smartypants> and call the \fBsmartypants.smartypants()\fP \%<#\:smartypants\:.smartypants> to convert a text, for example: .INDENT 0.0 .INDENT 3.5 .sp .EX import smartypants text = \(aq\(dqSmartyPants\(dq is smart, so is smartypants.py \-\- a Python port\(aq print(smartypants.smartypants(text)) .EE .UNINDENT .UNINDENT .sp It results: .INDENT 0.0 .INDENT 3.5 .sp .EX “SmartyPants” is smart, so is smartypants.py — a Python port .EE .UNINDENT .UNINDENT .SS Attributes .sp \fBsmartypants.smartypants()\fP \%<#\:smartypants\:.smartypants> accepts processing attributes, which tells it what need to be converted. .sp \fBSee also:\fP .INDENT 0.0 .INDENT 3.5 \fBsmartypants.Attr\fP \%<#\:smartypants\:._Attr> for a list of attributes. .UNINDENT .UNINDENT .sp To use these attributes, simply using bitwise \fIOR\fP operator, that is \fBA | B\fP: .INDENT 0.0 .INDENT 3.5 .sp .EX from smartypants import Attr attrs = Attr.q | Attr.d smartypants.smartypants(text, attrs) attrs = Attr.set1 | Attr.w smartypants.smartypants(text, attrs) .EE .UNINDENT .UNINDENT .SS Skipped HTML elements .SS Elements .sp By default, there are a few HTML elements that \fBsmartypants.smartypants()\fP \%<#\:smartypants\:.smartypants> do not try to be smart with them: .INDENT 0.0 .INDENT 3.5 .sp .EX tags_to_skip = [\(aqpre\(aq, \(aqsamp\(aq, \(aqcode\(aq, \(aqtt\(aq, \(aqkbd\(aq, \(aqscript\(aq, \(aqstyle\(aq, \(aqmath\(aq] .EE .UNINDENT .UNINDENT .sp If you need to change, for example, adding additional tags and remove one of them: .INDENT 0.0 .INDENT 3.5 .sp .EX >>> from smartypants import tags_to_skip as tags >>> tags.append(\(aqa\(aq) >>> tags.remove(\(aqcode\(aq) >>> tags [\(aqpre\(aq, \(aqsamp\(aq, \(aqtt\(aq, \(aqkbd\(aq, \(aqscript\(aq, \(aqstyle\(aq, \(aqmath\(aq, \(aqa\(aq] .EE .UNINDENT .UNINDENT .sp The \fBsmartypants.tags_to_skip\fP \%<#\:smartypants\:.tags_to_skip> is compiled into a regular expression for being used by \fBsmartypants.smartypants()\fP \%<#\:smartypants\:.smartypants>\&. You could actually overwrite \fBsmartypants._tags_to_skip_regex()\fP \%<#\:smartypants\:._tags_to_skip_regex> and return with your own regular expression. .SS Comments .sp HTML comments are always skipped since they are not rendered in browsers. .INDENT 0.0 .INDENT 3.5 .sp .EX >>> from smartypants import smartypants as sp >>> print(sp(\(aq\(dqfoobar\(dq \-\->\(aq)) \(dqfoobar\(dq \-\-> .EE .UNINDENT .UNINDENT .sp \fBImportant:\fP .INDENT 0.0 .INDENT 3.5 Beware of \fB\-\-\fP, which should not or must not be in a HTML comment. .INDENT 0.0 .INDENT 3.5 .sp .EX >>> from smartypants import smartypants as sp >>> print(sp(\(aq\(dqfoo\-\-bar\(dq \-\->\(aq)) ”foo—bar” —> .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Backslash escapes .sp If you need to use literal straight quotes (or plain hyphens and periods), for example, text like \fB6\(aq2\(dq\fP may become \fB6‘2”\fP\&. To avoid such situation, you can use backslash escapes like \fB6\e\(aq2\e\(dq\fP\&. .sp \fBSee also:\fP .INDENT 0.0 .INDENT 3.5 \fBsmartypants.process_escapes()\fP \%<#\:smartypants\:.process_escapes> for a complete list of backslash escapes. .UNINDENT .UNINDENT .SH DEVELOPMENT .sp smartypants \% is hosted on GitHub. You can clone the repository or file an issue report from there. .SS Contributing .sp You are welcome to contribute whatever you can. Coding, documenting, reporting issues, requesting features, even correcting typos. .SS Testing .sp If you want to contribute to the source code, be sure that you check your modification can pass tests. Normally, if you use Unix\-like system, you should be able to run all tests with: .INDENT 0.0 .INDENT 3.5 .sp .EX make test .EE .UNINDENT .UNINDENT .sp It will test DOC8, PEP8, pyflakes, unittest, and package installation: .INDENT 0.0 .INDENT 3.5 .sp .EX make test_isort make test_doc8 make test_pep8 make test_pyflakes make test_test make test_setup .EE .UNINDENT .UNINDENT .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 They will all be tested with both Python 2 and Python 3. You may need to override \fBPY2_CMD\fP and/or \fBPY3_CMD\fP\&. .UNINDENT .UNINDENT .sp If \fBmake\fP isn\(aqt available, \fBsetup.py\fP can be used: .INDENT 0.0 .INDENT 3.5 .sp .EX python setup.py isort python setup.py pep8 python setup.py pyflakes python setup.py test .EE .UNINDENT .UNINDENT .sp For manual package installation test: .INDENT 0.0 .INDENT 3.5 .sp .EX python \-m pip install \-e . pip install \-\-user \-\-upgrade dist/smartypants\-.tar.gz .EE .UNINDENT .UNINDENT .SS Building .SS Package .sp You should be able to build the package with either of: .INDENT 0.0 .INDENT 3.5 .sp .EX make .EE .UNINDENT .UNINDENT .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 \fBmake\fP builds source tarball, zip, and win32 setup. .UNINDENT .UNINDENT .sp or: .INDENT 0.0 .INDENT 3.5 .sp .EX python setup.py sdist .EE .UNINDENT .UNINDENT .SS Documentation .sp You should be able to build the documentation with either of: .INDENT 0.0 .INDENT 3.5 .sp .EX make doc .EE .UNINDENT .UNINDENT .sp or: .INDENT 0.0 .INDENT 3.5 .sp .EX python setup.py build_sphinx .EE .UNINDENT .UNINDENT .SS Reporting .sp Please head over to Issues \% and create an issue for a bug report or feature request. .SH REFERENCE .SS smartypants module .sp \fBsmartypants()\fP is the core of smartypants module. .INDENT 0.0 .TP .B smartypants.Attr = Processing attributes, which tells \fBsmartypants()\fP what to convert .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fB_Attr\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .TP .B class smartypants._Attr class for instantiation of module attribute \fBAttr\fP\&. .INDENT 7.0 .TP .B B = 6 flag for double quotes (\fB\(ga\(gabackticks\(aq\(aq\fP) and single quotes (\fB\(gasingle\(aq\fP) to curly ones. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_backticks()\fP and \fBconvert_single_backticks()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B D = 24 flag for old\-school typewriter dashes (\fB\-\-\fP) to en\-dashes and dashes (\fB\-\-\-\fP) to em\-dashes. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_dashes_oldschool()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B b = 2 flag for double quotes (\fB\(ga\(gabackticks\(aq\(aq\fP) to curly ones. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_backticks()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B d = 8 flag for dashes (\fB\-\-\fP) to em\-dashes. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_dashes()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B property default Default value of attributes, same value as \fBset1\fP .UNINDENT .INDENT 7.0 .TP .B e = 64 flag for dashes (\fB\&...\fP) to ellipses. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_ellipses()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B h = 512 Output HTML named entities instead of numeric character references, for example, from \fB“\fP to \fB“\fP\&. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_entities()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B i = 40 flag for inverted old\-school typewriter dashes (\fB\-\-\fP) to em\-dashes and dashes (\fB\-\-\-\fP) to en\-dashes. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_dashes_oldschool_inverted()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B q = 1 flag for normal quotes (\fB\(dq\fP) and (\fB\(aq\fP) to curly ones. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_quotes()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B s = 768 Output ASCII equivalents instead of numeric character references, for example, from \fB—\fP to \fB\-\-\fP\&. .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_entities()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B set0 = 0 suppress all transformations. (Do nothing.) .UNINDENT .INDENT 7.0 .TP .B set1 = 75 equivalent to \fBq\fP | \fBb\fP | \fBd\fP | \fBe\fP .UNINDENT .INDENT 7.0 .TP .B set2 = 91 equivalent to \fBq\fP | \fBb\fP | \fBD\fP | \fBe\fP .sp For old school en\- and em\- dash. .UNINDENT .INDENT 7.0 .TP .B set3 = 107 equivalent to \fBq\fP | \fBb\fP | \fBi\fP | \fBe\fP .sp For inverted old school en & em\- dash.\(dq .UNINDENT .INDENT 7.0 .TP .B u = 256 Output Unicode characters instead of numeric character references, for example, from \fB“\fP to left double quotation mark (\fB“\fP) (U+201C). .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 \fBconvert_entities()\fP .UNINDENT .UNINDENT .UNINDENT .INDENT 7.0 .TP .B w = 128 flag for dashes (\fB"\fP) to ASCII double quotes (\fB\(dq\fP). .sp 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 character. SmartyPants only educates normal quotes, not entities (because ordinarily, entities are used for the explicit purpose of representing the specific character they represent). The \(dqw\(dq option must be used in conjunction with one (or both) of the other quote options (\(dqq\(dq or \(dqb\(dq). Thus, if you wish to apply all SmartyPants transformations (quotes, en\- and em\-dashes, and ellipses) and also convert \fB"\fP entities into regular quotes so SmartyPants can educate them. .UNINDENT .UNINDENT .INDENT 0.0 .TP .B smartypants._tags_to_skip_regex(tags=None) Convert a list of skipped tags into regular expression .sp The default \fItags\fP are \fBtags_to_skip\fP\&. .sp .EX >>> f = _tags_to_skip_regex >>> print(f([\(aqfoo\(aq, \(aqbar\(aq]).pattern) <(/)?(foo|bar)[^>]*> .EE .UNINDENT .INDENT 0.0 .TP .B smartypants._tokenize(text) Reference to an array of the tokens comprising the input string. Each token is either a tag (possibly with nested, tags contained therein, such as \fB\(dq>\fP, or a run of text between tags. Each element of the array is a two\-element array; the first is either \(aqtag\(aq or \(aqtext\(aq; the second is the actual value. .sp Based on the _tokenize() subroutine from Brad Choate\(aqs MTRegex plugin \%\&. .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_backticks(text) Convert \fB\(ga\(gabackticks\(aq\(aq\fP\-style double quotes in \fItext\fP into HTML curly quote entities. .sp .EX >>> print(convert_backticks(\(dq\(ga\(gaIsn\(aqt this fun?\(aq\(aq\(dq)) “Isn\(aqt this fun?” .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_dashes(text) Convert \fB\-\-\fP in \fItext\fP into em\-dash HTML entities. .sp .EX >>> quote = \(aqNothing endures but change. \-\- Heraclitus\(aq >>> print(convert_dashes(quote)) Nothing endures but change. — Heraclitus .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_dashes_oldschool(text) Convert \fB\-\-\fP and \fB\-\-\-\fP in \fItext\fP into en\-dash and em\-dash HTML entities, respectively. .sp .EX >>> quote = \(aqLife itself is the proper binge. \-\-\- Julia Child (1912\-\-2004)\(aq >>> print(convert_dashes_oldschool(quote)) Life itself is the proper binge. — Julia Child (1912–2004) .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_dashes_oldschool_inverted(text) Convert \fB\-\-\fP and \fB\-\-\-\fP in \fItext\fP into em\-dash and en\-dash HTML entities, respectively. .sp Two reasons why: .INDENT 7.0 .IP \(bu 2 First, unlike the en\- and em\-dash syntax supported by \fBconvert_dashes_oldschool()\fP, it\(aqs compatible with existing entries written before SmartyPants 1.1, back when \fB\-\-\fP was only used for em\-dashes. .IP \(bu 2 Second, em\-dashes are more common than en\-dashes, and so it sort of makes sense that the shortcut should be shorter to type. (Thanks to Aaron Swartz for the idea.) .UNINDENT .sp .EX >>> quote = \(aqDare to be naïve. \-\- Buckminster Fuller (1895\-\-\-1983)\(aq >>> print(convert_dashes_oldschool_inverted(quote)) Dare to be naïve. — Buckminster Fuller (1895–1983) .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_ellipses(text) Convert \fB\&...\fP in \fItext\fP into ellipsis HTML entities .sp .EX >>> print(convert_ellipses(\(aqHuh...?\(aq)) Huh…? .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_entities(text, mode) Convert numeric character references to, if \fImode\fP is .INDENT 7.0 .IP \(bu 2 \fI0\fP: Unicode characters .IP \(bu 2 \fI1\fP: HTML named entities .IP \(bu 2 \fI2\fP: ASCII equivalents .UNINDENT .sp .EX >>> print(convert_entities(\(aq‘\(aq, 0)) ‘ >>> print(convert_entities(\(aq‘SmartyPants’\(aq, 1)) ‘SmartyPants’ >>> print(convert_entities(\(aq“Hello — world.”\(aq, 2)) \(dqHello \-\- world.\(dq .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_quotes(text) Convert quotes in \fItext\fP into HTML curly quote entities. .sp .EX >>> print(convert_quotes(\(aq\(dqIsn\e\(aqt this fun?\(dq\(aq)) “Isn’t this fun?” .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.convert_single_backticks(text) Convert \fB\(gabackticks\(aq\fP\-style single quotes in \fItext\fP into HTML curly quote entities. .sp .EX >>> print(convert_single_backticks(\(dq\(gaIsn\(aqt this fun?\(aq\(dq)) ‘Isn’t this fun?’ .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.process_escapes(text) Processe the following backslash escape sequences in \fItext\fP\&. This is useful if you want to force a \(dqdumb\(dq quote or other character to appear. .TS box center; l|l|l. T{ Escape T} T{ Value T} T{ Character T} _ T{ \fB\e\e\fP T} T{ \fB\\fP T} T{ \fB\e\fP T} _ T{ \fB\e\(dq\fP T} T{ \fB"\fP T} T{ \fB\(dq\fP T} _ T{ \fB\e\(aq\fP T} T{ \fB'\fP T} T{ \fB\(aq\fP T} _ T{ \fB\e.\fP T} T{ \fB.\fP T} T{ \fB\&.\fP T} _ T{ \fB\e\-\fP T} T{ \fB-\fP T} T{ \fB\-\fP T} _ T{ \fB\e\(ga\fP T} T{ \fB`\fP T} T{ \fB\e\(ga\fP T} .TE .sp .EX >>> print(process_escapes(r\(aq\e\e\(aq)) \ >>> print(smartypants(r\(aq\(dqsmarty\(dq \e\(dqpants\e\(dq\(aq)) “smarty” "pants" .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.smartypants(text, attr=None) SmartyPants function .sp .EX >>> print(smartypants(\(aq\(dqfoo\(dq \-\- bar\(aq)) “foo” — bar >>> print(smartypants(\(aq\(dqfoo\(dq \-\- bar\(aq, Attr.d)) \(dqfoo\(dq — bar .EE .UNINDENT .INDENT 0.0 .TP .B smartypants.tags_to_skip = [\(aqpre\(aq, \(aqsamp\(aq, \(aqcode\(aq, \(aqtt\(aq, \(aqkbd\(aq, \(aqscript\(aq, \(aqstyle\(aq, \(aqmath\(aq] Skipped HTML elements .sp \fBSee also:\fP .INDENT 7.0 .INDENT 3.5 Skipped HTML elements \%<#\:skip-html> .UNINDENT .UNINDENT .UNINDENT .SH HISTORY .sp For changelog, please see Changes \%<>\&. .SS SmartyPants .sp \fBPerl SmartyPants or original SmartyPants.\fP .sp In 2002, John Gruber \% started the SmartyPants for Movable Type \%, written in Perl. .sp Rael Dornfest \% ported SmartyPants to Blosxom. Portions of the SmartyPants are based on Brad Choate \%\(aqs nifty MTRegex plug\-in. Jeremy Hedley \% and Charles Wiltgen \% deserve mention for exemplary beta testing of SmartyPants. .SS smartypants.py .sp \fBsmartypants.py, Python [port of] SmartyPants.\fP .sp In 2004, Chad Miller \% ported it to Python to use with Pyblosxom \%\&. .sp Brad Choate also contributed a few bits of source code to the Python port. Brad Choate is a fine hacker indeed. It was later packaged for PyPI by Hao Lian. .SS smartypants .sp \fBsmartypants, Python [fork of] SmartyPants.\fP .sp In August 2013, smartypants became managed by Yu\-Jie Lin \% after they contacted Chad Miller and Hao Lian. Lin took over the project manager role and the package ownership on PyPI. Leo Hemsted \% managed the project in 2017. .sp Since 2025, smartypants has been managed by Justin Mayer \%\&. .SH CHANGES .sp \fBNote:\fP .INDENT 0.0 .INDENT 3.5 Releases without timestamps mean they will be released in the future. .sp \fIDevelopment\fP means it\(aqs current changes in development repository. .UNINDENT .UNINDENT .SS Releases 2.0 and greater .SS Release 2.0.2 (2025\-06\-17) .INDENT 0.0 .IP \(bu 2 Fix double closing quotes after an HTML block .IP \(bu 2 Fix regular expressions and tests for Python 3.12+ .IP \(bu 2 Move documentation to ReadTheDocs .UNINDENT .SS Release 2.0.1 (2017\-12\-20) .INDENT 0.0 .IP \(bu 2 use \fBre.match\fP instead of \fBre.search\fP to improve performance on large strings .UNINDENT .SS Release 2.0.0 (2016\-12\-28T06:18:42Z) .INDENT 0.0 .IP \(bu 2 drop Pyblosxom support .IP \(bu 2 drop str\-type \fBattr\fP .INDENT 2.0 .IP \(bu 2 use \fBAttr.default\fP instead of \fBdefault_smartypants_attr\fP .UNINDENT .IP \(bu 2 drop fooBarXyz functions, such as \fBsmartyPants\fP, \fBeducateQuotes\fP, and \fBprocessEscapes\fP .UNINDENT .INDENT 0.0 .IP \(bu 2 add \fBAttr.u\fP and \fBAttr.h\fP for Unicode characters and HTML named entities outputs, respectively. The \fBstupefy_entities\fP has become \fBconvert_entities\fP to support all three types of conversions. (#6) .UNINDENT .INDENT 0.0 .IP \(bu 2 Makefile .INDENT 2.0 .IP \(bu 2 do not build \fBbdist_wininst \-\-plat\-name win32\fP per \fBPEP 527#bdist\-dmg\-bdist\-msi\-and\-bdist\-wininst\fP \% .IP \(bu 2 do not make \fBsdist \-\-format=zip\fP, it would get a duplicate warning on PyPI .UNINDENT .INDENT 2.0 .IP \(bu 2 test packages build in \fBtest_setup\fP target .UNINDENT .INDENT 2.0 .IP \(bu 2 rename target \fBinstall_test\fP to \fBtest_setup\fP .UNINDENT .UNINDENT .SS Releases 1.7 and greater .SS Release 1.8.6: 2014\-07\-19T11:20:52Z .INDENT 0.0 .IP \(bu 2 Makefile .INDENT 2.0 .IP \(bu 2 add \fBLC_ALL=C\fP test for locale setting on \fBsetup.py\fP wrt #5 .UNINDENT .INDENT 2.0 .IP \(bu 2 change virtualenv invocation method in \fBinstall_test\fP target .UNINDENT .IP \(bu 2 fix UnicodeDecodeError on opening \fBsmartypants.py\fP, which includes Unicode characters, when running \fBsetup.py\fP with Python 3 and specific locales (#5, patch by Benoît Monin) .UNINDENT .SS Release 1.8.5: 2014\-07\-03T01:56:03Z .INDENT 0.0 .IP \(bu 2 fix requirement of Wheel, now optional (#4) .UNINDENT .SS Release 1.8.4: 2014\-06\-29T04:39:59Z .INDENT 0.0 .IP \(bu 2 add missing \fBCOPYING\fP and \fBCHANGES.rst\fP to package (#3) .IP \(bu 2 add \fBbdist_wheel\fP to the building process for Python Wheel format .IP \(bu 2 add \fBtest_doc8\fP target .UNINDENT .INDENT 0.0 .IP \(bu 2 fix \fBinstall_test\fP on missing of Wheel package .IP \(bu 2 fix argparse version option breaks CLI on Python 3 .UNINDENT .SS Release 1.8.3: 2013\-11\-08T03:03:43Z .INDENT 0.0 .IP \(bu 2 fix \fB_tokenize\fP can not handle HTML comment properly .sp This fix includes pull request #1 with modification for handling \fB\-\-\fP appears in a comment, which makes the comment not a comment .UNINDENT .SS Release 1.8.2: 2013\-08\-28T11:38:42Z .INDENT 0.0 .IP \(bu 2 deprecate fooBarXyz functions, such as \fBeducateQuotes\fP and \fBprocessEscapes\fP .UNINDENT .INDENT 0.0 .IP \(bu 2 fix \fB\-\-\-\fP being converted in \fBeducateDashes\fP .sp The Perl doesn\(aqt do such, and it\(aqs possibly a mistaken in version v1.5_1.5 (eed4a8a16f11) .sp If you want the same behavior with default attributes, you need to use \fBAttr.q | Attr.b | Attr.i | Attr.e\fP .IP \(bu 2 setup.py .INDENT 2.0 .IP \(bu 2 add \fBbuild_sphinx\fP and \fBupload_sphinx\fP commands .UNINDENT .IP \(bu 2 Makefile .INDENT 2.0 .IP \(bu 2 add \fBdoc\fP for documentation generation .IP \(bu 2 add \fBupload_doc\fP for uploading to PyPI .IP \(bu 2 add \fBclean\fP for cleaning up built files .UNINDENT .UNINDENT .INDENT 0.0 .IP \(bu 2 add documentation generation .UNINDENT .SS Release 1.8.1: 2013\-08\-20T02:27:35Z .INDENT 0.0 .IP \(bu 2 fix deprecated \fBsmartyPants\fP returns nothing (#2) .UNINDENT .INDENT 0.0 .IP \(bu 2 add test file for deprecated stuff .UNINDENT .SS Release 1.8.0: 2013\-08\-18T11:47:27Z .INDENT 0.0 .IP \(bu 2 deprecate str\-type \fBattr\fP with: .INDENT 2.0 .IP \(bu 2 redesign attr input with new \fBAttr\fP object .INDENT 2.0 .IP \(bu 2 \fB\(dq\-1\(dq\fP now is \fBAttr.s\fP (\fB\(dqs\(dq\fP) .UNINDENT .IP \(bu 2 \fB_str_attr_to_int()\fP to handle str\-type before the removal .UNINDENT .IP \(bu 2 deprecate function name \fBsmartyPants\fP, now \fBsmartypants\fP .IP \(bu 2 remove \fBtags_to_skip_regex\fP and add \fBtags_to_skip\fP as a list of skipped HTML with a helper function to compile a regular expression .UNINDENT .INDENT 0.0 .IP \(bu 2 command\-line .INDENT 2.0 .IP \(bu 2 add \fB\-\-version\fP .IP \(bu 2 add \fB\-\-skip\fP for skipped elements .UNINDENT .IP \(bu 2 add Makefile: .INDENT 2.0 .IP \(bu 2 \fBtest_pep8\fP, \fBtest_pyflakes\fP, and \fBtest_test\fP (unittest) targets .IP \(bu 2 \fBinstall_test\fP target for checking package installation .INDENT 2.0 .IP \(bu 2 \fBtest\fP target for all tests above .UNINDENT .UNINDENT .UNINDENT .INDENT 0.0 .IP \(bu 2 add \fBstyle\fP, \fBsamp\fP, and \fBtt\fP to be skipped HTML elements .UNINDENT .SS Release 1.7.1: 2013\-08\-14T06:45:59Z .INDENT 0.0 .IP \(bu 2 fix \fBREADME\-PyPI.rst\fP missing while installing .UNINDENT .SS Release 1.7.0: 2013\-08\-14T05:51:20Z .INDENT 0.0 .IP \(bu 2 deprecate Pyblosxom support .IP \(bu 2 remove HBS language translation added in 1.5_1.7. .UNINDENT .INDENT 0.0 .IP \(bu 2 fix \fBconvert_quot\fP always enabled .sp It was always turned on. To have same effect of previous \fB1\fP attr, equivalent attrs are \fBqbdew\fP\&. Now \fB1\fP means \fBqbde\fP .UNINDENT .INDENT 0.0 .IP \(bu 2 add Python 3 support .IP \(bu 2 add unittest and checks .IP \(bu 2 add CLI script .UNINDENT .SS Releases 1.6 .sp The following releases were made by Hao Lian: .SS Release 1.6.0.3: 2009\-04\-21 .sp \fBsmartypants.py\fP exactly the same as 1.5_1.6 .SS Release 1.6.0.2: 2008\-12\-20 .sp \fBsmartypants.py\fP exactly the same as 1.5_1.6 .SS Releases 1.5 .sp The following releases were made by Chad Miller: .SS Release 1.5_1.7: Fri, 09 Aug 2013 07:34:16 \-0400 .INDENT 0.0 .IP \(bu 2 Add HBS language translation. Patch by by Vera Djuraskovic from Webhostinggeeks.com .IP \(bu 2 Add Python3 support .UNINDENT .SS Release 1.5_1.6: Fri, 27 Jul 2007 07:06:40 \-0400 .INDENT 0.0 .IP \(bu 2 Fixed bug where blocks of precious unalterable text was instead interpreted. Thanks to Le Roux and Dirk van Oosterbosch .UNINDENT .SS Release 1.5_1.5: Sat, 13 Aug 2005 15:50:24 \-0400 .INDENT 0.0 .IP \(bu 2 Fix bogus magical quotation when there is no hint that the user wants it, e.g., in \(dq21st century\(dq. Thanks to Nathan Hamblen .IP \(bu 2 Be smarter about quotes before terminating numbers in an en\-dash\(aqed range .UNINDENT .SS Release 1.5_1.4: Thu, 10 Feb 2005 20:24:36 \-0500 .INDENT 0.0 .IP \(bu 2 Fix a date\-processing bug, as reported by jacob childress .IP \(bu 2 Begin a test\-suite for ensuring correct output .IP \(bu 2 Removed import of \(dqstring\(dq, since I didn\(aqt really need it (This was my first every Python program. Sue me!) .UNINDENT .SS Release 1.5_1.3: Wed, 15 Sep 2004 18:25:58 \-0400 .INDENT 0.0 .IP \(bu 2 Abort processing if the flavour is in forbidden\-list. Default of [ \(dqrss\(dq ] (Idea of Wolfgang SCHNERRING.) .IP \(bu 2 Remove stray virgules from en\-dashes. Patch by Wolfgang SCHNERRING .UNINDENT .SS Release 1.5_1.2: Mon, 24 May 2004 08:14:54 \-0400 .INDENT 0.0 .IP \(bu 2 Some single quotes weren\(aqt replaced properly. Diff\-tesuji played by Benjamin GEIGER .UNINDENT .SS Release 1.5_1.1: Sun, 14 Mar 2004 14:38:28 \-0500 .INDENT 0.0 .IP \(bu 2 Support upcoming pyblosxom 0.9 plugin verification feature .UNINDENT .SS Release 1.5_1.0: Tue, 09 Mar 2004 08:08:35 \-0500 .INDENT 0.0 .IP \(bu 2 Initial release .UNINDENT .SH COPYRIGHT .SS SmartyPants .INDENT 0.0 .INDENT 3.5 .sp .EX Copyright (c) 2003 John Gruber (http://daringfireball.net/) All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name \(dqSmartyPants\(dq nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. This software is provided by the copyright holders and contributors \(dqas is\(dq and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. .EE .UNINDENT .UNINDENT .SS smartypants .INDENT 0.0 .INDENT 3.5 .sp .EX smartypants is a derivative work of SmartyPants. Copyright (c) 2025–present, Justin Mayer Copyright (c) 2017, Leo Hemsted Copyright (c) 2013, 2014, 2015, 2016 Yu\-Jie Lin Copyright (c) 2004, 2005, 2007, 2013 Chad Miller Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. This software is provided by the copyright holders and contributors \(dqas is\(dq and any express or implied warranties, including, but not limited to, the implied warranties of merchantability and fitness for a particular purpose are disclaimed. In no event shall the copyright owner or contributors be liable for any direct, indirect, incidental, special, exemplary, or consequential damages (including, but not limited to, procurement of substitute goods or services; loss of use, data, or profits; or business interruption) however caused and on any theory of liability, whether in contract, strict liability, or tort (including negligence or otherwise) arising in any way out of the use of this software, even if advised of the possibility of such damage. .EE .UNINDENT .UNINDENT .INDENT 0.0 .IP \(bu 2 Index \%<> .IP \(bu 2 Module Index \%<> .IP \(bu 2 Search Page \%<> .UNINDENT .SH Author Justin Mayer .SH Copyright 2025–present, Justin Mayer; 2013–2016, Yu-Jie Lin; 2004–2013, Chad Miller .\" End of generated man page.