diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 8e73af4ae..5e46caedb 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -309,18 +309,19 @@ enquote starred mblang = do else doubleQuoted . langspan <$> withQuoteContext InDoubleQuote tok blockquote :: PandocMonad m => Bool -> Maybe Text -> LP m Blocks -blockquote citations mblang = do - citePar <- if citations - then do - cs <- cites NormalCitation False - return $ para (cite cs mempty) - else return mempty +blockquote cvariant mblang = do + citepar <- if cvariant + then (\xs -> para (cite xs mempty)) + <$> cites NormalCitation False + else option mempty $ para <$> bracketed inline let lang = mblang >>= babelLangToBCP47 let langdiv = case lang of Nothing -> id Just l -> divWith ("",[],[("lang", renderLang l)]) + _closingPunct <- option mempty $ bracketed inline -- currently ignored bs <- grouped block - return $ blockQuote . langdiv $ (bs <> citePar) + optional $ symbolIn (".:;?!" :: [Char]) -- currently ignored + return $ blockQuote . langdiv $ (bs <> citepar) doAcronym :: PandocMonad m => Text -> LP m Inlines doAcronym form = do diff --git a/test/command/6802.md b/test/command/6802.md new file mode 100644 index 000000000..8f56f0e43 --- /dev/null +++ b/test/command/6802.md @@ -0,0 +1,9 @@ +``` +% pandoc -f latex -t native +\blockquote[test][]{quote} +^D +[BlockQuote + [Para [Str "quote"] + ,Para [Str "test"]]] + +```