diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-07-17 23:06:49 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-07-17 23:07:53 -0700 |
commit | 31a5bccd57750f962d35235060b1f000afe957d4 (patch) | |
tree | acd8ccdaed2f9151363746dfb23436e14601a3cb | |
parent | 46099e79defe662e541b12548200caf29063c1c6 (diff) | |
download | pandoc-31a5bccd57750f962d35235060b1f000afe957d4.tar.gz |
LaTeX reader: avoid trailing hyphen in translating languages.
Previously `\foreignlanguage{english}` turned into `<span lang="en-">`.
The same issue affected Arabic.
Closes #7447.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX/Lang.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Lang.hs b/src/Text/Pandoc/Readers/LaTeX/Lang.hs index 6a8327904..3151fc688 100644 --- a/src/Text/Pandoc/Readers/LaTeX/Lang.hs +++ b/src/Text/Pandoc/Readers/LaTeX/Lang.hs @@ -105,7 +105,7 @@ polyglossiaLangToBCP47 = M.fromList "locale=morocco" -> Lang "ar" Nothing (Just "MA") [] [] [] "locale=mauritania" -> Lang "ar" Nothing (Just "MR") [] [] [] "locale=tunisia" -> Lang "ar" Nothing (Just "TN") [] [] [] - _ -> Lang "ar" Nothing (Just "") [] [] []) + _ -> Lang "ar" Nothing Nothing [] [] []) , ("german", \o -> case T.filter (/=' ') o of "spelling=old" -> Lang "de" Nothing (Just "DE") ["1901"] [] [] "variant=austrian,spelling=old" @@ -126,7 +126,7 @@ polyglossiaLangToBCP47 = M.fromList "variant=british" -> Lang "en" Nothing (Just "GB") [] [] [] "variant=newzealand" -> Lang "en" Nothing (Just "NZ") [] [] [] "variant=american" -> Lang "en" Nothing (Just "US") [] [] [] - _ -> Lang "en" Nothing (Just "") [] [] []) + _ -> Lang "en" Nothing Nothing [] [] []) , ("usorbian", \_ -> Lang "hsb" Nothing Nothing [] [] []) , ("latin", \o -> case T.filter (/=' ') o of "variant=classic" -> Lang "la" Nothing Nothing ["x-classic"] [] [] |