@@ -975,13 +975,22 @@ quoted' f starter ender = do
975975 cs -> cs)
976976 else lit startchs
977977
978−enquote :: PandocMonad m => LP m Inlines
979−enquote = do
978+enquote :: PandocMonad m => Bool -> Maybe Text -> LP m Inlines
979+enquote starred mblang = do
980980 skipopts
981+ let lang = (T.unpack <$> mblang) >>= babelLangToBCP47
982+ let langspan = case lang of
983+ Nothing -> id
984+ Just l -> spanWith ("",[],[("lang", renderLang l)])
981985 quoteContext <- sQuoteContext <$> getState
982− if quoteContext == InDoubleQuote
983− then singleQuoted <$> withQuoteContext InSingleQuote tok
984− else doubleQuoted <$> withQuoteContext InDoubleQuote tok
986+ if starred || quoteContext == InDoubleQuote
987+ then singleQuoted . langspan <$> withQuoteContext InSingleQuote tok
988+ else doubleQuoted . langspan <$> withQuoteContext InDoubleQuote tok
989+
990+blockquote :: PandocMonad m => LP m Blocks
991+blockquote = do
992+ bs <- grouped block
993+ return $ blockQuote bs
985994
986995doAcronym :: PandocMonad m => String -> LP m Inlines
987996doAcronym form = do
@@ -1769,7 +1778,14 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
17691778 src <- unescapeURL . T.unpack .
17701779 removeDoubleQuotes . untokenize <$> braced
17711780 mkImage options src)
1772− , ("enquote", enquote)
1781+ , ("enquote*", enquote True Nothing)
1782+ , ("enquote", enquote False Nothing)
1783+ -- foreignquote is supposed to use native quote marks
1784+ , ("foreignquote*", braced >>= enquote True . Just . untokenize)
1785+ , ("foreignquote", braced >>= enquote False . Just . untokenize)
1786+ -- hypehnquote uses regular quotes
1787+ , ("hyphenquote*", braced >>= enquote True . Just . untokenize)
1788+ , ("hyphenquote", braced >>= enquote False . Just . untokenize)
17731789 , ("figurename", doTerm Translations.Figure)
17741790 , ("prefacename", doTerm Translations.Preface)
17751791 , ("refname", doTerm Translations.References)
@@ -2524,6 +2540,8 @@ blockCommands = M.fromList
25242540 -- LaTeX colors
25252541 , ("textcolor", coloredBlock "color")
25262542 , ("colorbox", coloredBlock "background-color")
2543+ -- csquotse
2544+ , ("blockquote", blockquote)
25272545 -- include
25282546 , ("include", include "include")
25292547 , ("input", include "input")