@@ -74,6 +74,7 @@ readMediaWiki opts s = do
7474 , mwHeaderMap = M.empty
7575 , mwIdentifierList = Set.empty
7676 , mwLogMessages = []
77+ , mwInTT = False
7778 }
7879 (s ++ "\n")
7980 case parsed of
@@ -87,6 +88,7 @@ data MWState = MWState { mwOptions :: ReaderOptions
8788 , mwHeaderMap :: M.Map Inlines String
8889 , mwIdentifierList :: Set.Set String
8990 , mwLogMessages :: [LogMessage]
91+ , mwInTT :: Bool
9092 }
9193
9294type MWParser m = ParserT [Char] MWState m
@@ -569,7 +571,12 @@ inlineTag = do
569571 TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"
570572 TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"
571573 TagOpen "code" _ -> encode <$> inlinesInTags "code"
572− TagOpen "tt" _ -> encode <$> inlinesInTags "tt"
574+ TagOpen "tt" _ -> do
575+ inTT <- mwInTT <$> getState
576+ updateState $ \st -> st{ mwInTT = True }
577+ result <- encode <$> inlinesInTags "tt"
578+ updateState $ \st -> st{ mwInTT = inTT }
579+ return result
573580 TagOpen "hask" _ -> B.codeWith ("",["haskell"],[]) <$> charsInTags "hask"
574581 _ -> B.rawInline "html" . snd <$> htmlTag (~== tag)
575582
@@ -690,6 +697,8 @@ strong = B.strong <$> nested (inlinesBetween start end)
690697doubleQuotes :: PandocMonad m => MWParser m Inlines
691698doubleQuotes = do
692699 guardEnabled Ext_smart
700+ inTT <- mwInTT <$> getState
701+ guard (not inTT)
693702 B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote)
694703 where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar
695704 closeDoubleQuote = try $ sym "\""