]> git.lyx.org Git - lyx.git/commitdiff
Fix xhtml output of French double guillemets (spacing)
authorJuergen Spitzmueller <spitz@lyx.org>
Sat, 10 Dec 2016 15:13:02 +0000 (16:13 +0100)
committerJuergen Spitzmueller <spitz@lyx.org>
Sat, 10 Dec 2016 15:13:02 +0000 (16:13 +0100)
src/insets/InsetQuotes.cpp

index e4f058c6e28875f413f8d0032d8ae8f699d091b9..29d9251697803156e5b728fb3621443664ba98b8 100644 (file)
@@ -309,7 +309,19 @@ int InsetQuotes::plaintext(odocstringstream & os,
 
 docstring InsetQuotes::getQuoteEntity() const {
        const int quoteind = quote_index[side_][language_];
-       return from_ascii(html_quote[times_][quoteind]);
+       docstring res = from_ascii(html_quote[times_][quoteind]);
+       // in French, thin spaces are added inside double guillemets
+       // FIXME: this should be done by a separate quote type.
+       if (prefixIs(context_lang_, "fr")
+           && times_ == DoubleQuotes && language_ == FrenchQuotes) {
+               // THIN SPACE (U+2009)
+               docstring const thin_space = from_ascii("&#x2009;");
+               if (side_ == LeftQuote)
+                       res += thin_space;
+               else
+                       res = thin_space + res;
+       }
+       return res;
 }