@@ -975,13 +975,22 @@ quoted' f starter ender = do
975 cs -> cs)
975 cs -> cs)
976 else lit startchs
976 else lit startchs
978−enquote :: PandocMonad m => LP m Inlines
978+enquote :: PandocMonad m => Bool -> Maybe Text -> LP m Inlines
979−enquote = do
979+enquote starred mblang = do
981+ let lang = (T.unpack <$> mblang) >>= babelLangToBCP47
982+ let langspan = case lang of
984+ Just l -> spanWith ("",[],[("lang", renderLang l)])
981 quoteContext <- sQuoteContext <$> getState
985 quoteContext <- sQuoteContext <$> getState
982− if quoteContext == InDoubleQuote
986+ if starred || quoteContext == InDoubleQuote
983− then singleQuoted <$> withQuoteContext InSingleQuote tok
987+ then singleQuoted . langspan <$> withQuoteContext InSingleQuote tok
984− else doubleQuoted <$> withQuoteContext InDoubleQuote tok
988+ else doubleQuoted . langspan <$> withQuoteContext InDoubleQuote tok
990+blockquote :: PandocMonad m => LP m Blocks
993+ return $ blockQuote bs
986doAcronym :: PandocMonad m => String -> LP m Inlines
995doAcronym :: PandocMonad m => String -> LP m Inlines
987doAcronym form = do
996doAcronym form = do
@@ -1769,7 +1778,14 @@ inlineCommands = M.union inlineLanguageCommands $ M.fromList
1769 src <- unescapeURL . T.unpack .
1778 src <- unescapeURL . T.unpack .
1770 removeDoubleQuotes . untokenize <$> braced
1779 removeDoubleQuotes . untokenize <$> braced
1771 mkImage options src)
1780 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)
1773 , ("figurename", doTerm Translations.Figure)
1789 , ("figurename", doTerm Translations.Figure)
1774 , ("prefacename", doTerm Translations.Preface)
1790 , ("prefacename", doTerm Translations.Preface)
1775 , ("refname", doTerm Translations.References)
1791 , ("refname", doTerm Translations.References)
@@ -2524,6 +2540,8 @@ blockCommands = M.fromList
2524 -- LaTeX colors
2540 -- LaTeX colors
2525 , ("textcolor", coloredBlock "color")
2541 , ("textcolor", coloredBlock "color")
2526 , ("colorbox", coloredBlock "background-color")
2542 , ("colorbox", coloredBlock "background-color")
2544+ , ("blockquote", blockquote)
2527 -- include
2545 -- include
2528 , ("include", include "include")
2546 , ("include", include "include")
2529 , ("input", include "input")
2547 , ("input", include "input")