diff options
| author | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2018-11-21 13:58:51 +0000 |
|---|---|---|
| committer | milde <milde@929543f6-e4f2-0310-98a6-ba3bd3dd1d04> | 2018-11-21 13:58:51 +0000 |
| commit | 95a6d3e4e5f68bbfd3a01859e7fcdcbd92fd71b0 (patch) | |
| tree | a736ae71f96632bcbe5aac9464731662eeb0dec9 /docs | |
| parent | 507c582f539b36bf89611030c00858d2471135eb (diff) | |
| download | docutils-95a6d3e4e5f68bbfd3a01859e7fcdcbd92fd71b0.tar.gz | |
Revert the fix for backslash escaping in transforms.
Still waiting for review.
Reverts last three commits from a local "feature branch"
unintentionally applied to trunk with `git svn`.
git-svn-id: http://svn.code.sf.net/p/docutils/code/trunk/docutils@8235 929543f6-e4f2-0310-98a6-ba3bd3dd1d04
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/user/smartquotes.txt | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/docs/user/smartquotes.txt b/docs/user/smartquotes.txt index 0cdfbe27b..92bbafd2d 100644 --- a/docs/user/smartquotes.txt +++ b/docs/user/smartquotes.txt @@ -5,8 +5,8 @@ Smart Quotes for Docutils :Author: Günter Milde, based on SmartyPants by John Gruber, Brad Choate, and Chad Miller :Contact: docutils-develop@lists.sourceforge.net -:Revision: $Revision: 8112 $ -:Date: $Date: 2017-06-14 16:20:20 +0200 (Mi, 14. Jun 2017) $ +:Revision: $Revision$ +:Date: $Date$ :License: Released under the terms of the `2-Clause BSD license`_ :Abstract: This document describes the Docutils `smartquotes` module. @@ -25,19 +25,19 @@ transformation on Text nodes that includes the following steps: - 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 +ASCII---straight quotes, plain dashes, and plain dots---while Docutils generates documents with typographical quotes, dashes, and ellipses. Advantages: * typing speed (especially when blind-typing), * the possibility to change the quoting style of the - complete document with just one configuration option, -* restriction to 7-bit ASCII characters in the source. + 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, +* Dual use of the "ASCII-apostrophe" (') as single quote and apostrophe, * languages that do not use whitespace around words. So, please consider also @@ -54,25 +54,22 @@ 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. - -.. class:: booktabs - -========= ========= == ======== ========== -Input Output Input Output -========= ========= == ======== ========== -``\\`` \\ ``\...`` \... -``\"`` \" ``\--`` \-- -``\'`` \' ``\``` \` -========= ========= == ======== ========== +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\" monitor. +foot and inch marks: 6\\'2\\" tall; a 17\\" iMac. -.. _backslash escape: ../ref/rst/restructuredtext.html#escaping-mechanism +.. _escaping mechanism: ../ref/rst/restructuredtext.html#escaping-mechanism Localisation @@ -85,7 +82,7 @@ __ https://en.wikipedia.org/wiki/Quotation_mark#Summary_table `SmartQuotes` inserts quotation marks depending on the language of the current block element and the value of the `"smart_quotes" setting`_.\ -[#x-altquot]_ +[#x-altquot]_ There is built-in support for the following languages:\ [#smartquotes-locales]_ :af: .. class:: language-af |
