From f99f5b23ee630a33cf2c149a3928a533296e3129 Mon Sep 17 00:00:00 2001 From: Dmitry Shachnev Date: Mon, 17 Apr 2017 14:25:28 +0300 Subject: [PATCH] Backport fixes for French quotes from docutils --- sphinx/util/smartypants.py | 6 ++++++ tests/test_build_html.py | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sphinx/util/smartypants.py b/sphinx/util/smartypants.py index 3932e9386..e42bfa82f 100644 --- a/sphinx/util/smartypants.py +++ b/sphinx/util/smartypants.py @@ -141,3 +141,9 @@ if docutils_version < (0, 13, 2): # Monkey patch the old docutils versions to fix the issue mentioned # at https://sourceforge.net/p/docutils/bugs/313/ smartquotes.educateQuotes = educateQuotes + + # Fix the issue with French quotes mentioned at + # https://sourceforge.net/p/docutils/mailman/message/35760696/ + quotes = smartquotes.smartchars.quotes + quotes['fr'] = (u'«\u00a0', u'\u00a0»', u'“', u'”') + quotes['fr-ch'] = u'«»‹›' diff --git a/tests/test_build_html.py b/tests/test_build_html.py index e8dc2b831..0758874a7 100644 --- a/tests/test_build_html.py +++ b/tests/test_build_html.py @@ -303,7 +303,7 @@ def test_static_output(app): (".//li", u'Ellipsis…'), (".//li//code//span[@class='pre']", 'foo--"bar"...'), (".//p", u'Этот «абзац» должен использовать „русские“ кавычки.'), - (".//p", u'Il dit : « C’est ‹ super › ! »'), + (".//p", u'Il dit : « C’est “super” ! »'), ], 'objects.html': [ (".//dt[@id='mod.Cls.meth1']", ''),