@@ -59,6 +59,7 @@ import Text.Pandoc.Readers.LaTeX.Math (dollarsMath, inlineEnvironments,
5959import Text.Pandoc.Readers.LaTeX.Table (tableEnvironments)
6060import Text.Pandoc.Readers.LaTeX.Macro (macroDef)
6161import Text.Pandoc.Readers.LaTeX.Lang (inlineLanguageCommands,
62+ enquoteCommands,
6263 babelLangToBCP47, setDefaultLanguage)
6364import Text.Pandoc.Readers.LaTeX.SIunitx (siunitxCommands)
6465import Text.Pandoc.Readers.LaTeX.Inline (acronymCommands, refCommands,
@@ -293,18 +294,6 @@ quoted' f starter ender = do
293294lit :: Text -> LP m Inlines
294295lit = pure . str
295296
296−enquote :: PandocMonad m => Bool -> Maybe Text -> LP m Inlines
297−enquote starred mblang = do
298− skipopts
299− let lang = mblang >>= babelLangToBCP47
300− let langspan = case lang of
301− Nothing -> id
302− Just l -> spanWith ("",[],[("lang", renderLang l)])
303− quoteContext <- sQuoteContext <$> getState
304− if starred || quoteContext == InDoubleQuote
305− then singleQuoted . langspan <$> withQuoteContext InSingleQuote tok
306− else doubleQuoted . langspan <$> withQuoteContext InDoubleQuote tok
307−
308297blockquote :: PandocMonad m => Bool -> Maybe Text -> LP m Blocks
309298blockquote cvariant mblang = do
310299 citepar <- if cvariant
@@ -359,6 +348,7 @@ inlineCommands = M.unions
359348 , nameCommands
360349 , verbCommands
361350 , charCommands
351+ , enquoteCommands tok
362352 , inlineLanguageCommands tok
363353 , biblatexInlineCommands tok
364354 , rest ]
@@ -418,14 +408,6 @@ inlineCommands = M.unions
418408 src <- braced
419409 mkImage options . unescapeURL . removeDoubleQuotes $
420410 untokenize src)
421− , ("enquote*", enquote True Nothing)
422− , ("enquote", enquote False Nothing)
423− -- foreignquote is supposed to use native quote marks
424− , ("foreignquote*", braced >>= enquote True . Just . untokenize)
425− , ("foreignquote", braced >>= enquote False . Just . untokenize)
426− -- hypehnquote uses regular quotes
427− , ("hyphenquote*", braced >>= enquote True . Just . untokenize)
428− , ("hyphenquote", braced >>= enquote False . Just . untokenize)
429411 , ("hyperlink", hyperlink)
430412 , ("hypertarget", hypertargetInline)
431413 -- hyphenat