@@ -74,6 +74,7 @@ readMediaWiki opts s = do
74 , mwHeaderMap = M.empty
74 , mwHeaderMap = M.empty
75 , mwIdentifierList = Set.empty
75 , mwIdentifierList = Set.empty
76 , mwLogMessages = []
76 , mwLogMessages = []
78 (s ++ "\n")
79 (s ++ "\n")
79 case parsed of
80 case parsed of
@@ -87,6 +88,7 @@ data MWState = MWState { mwOptions :: ReaderOptions
87 , mwHeaderMap :: M.Map Inlines String
88 , mwHeaderMap :: M.Map Inlines String
88 , mwIdentifierList :: Set.Set String
89 , mwIdentifierList :: Set.Set String
89 , mwLogMessages :: [LogMessage]
90 , mwLogMessages :: [LogMessage]
92type MWParser m = ParserT [Char] MWState m
94type MWParser m = ParserT [Char] MWState m
@@ -569,7 +571,12 @@ inlineTag = do
569 TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"
571 TagOpen "sub" _ -> B.subscript <$> inlinesInTags "sub"
570 TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"
572 TagOpen "sup" _ -> B.superscript <$> inlinesInTags "sup"
571 TagOpen "code" _ -> encode <$> inlinesInTags "code"
573 TagOpen "code" _ -> encode <$> inlinesInTags "code"
574+ TagOpen "tt" _ -> do
575+ inTT <- mwInTT <$> getState
576+ updateState $ \st -> st{ mwInTT = True }
572− TagOpen "tt" _ -> encode <$> inlinesInTags "tt"
577+ result <- encode <$> inlinesInTags "tt"
578+ updateState $ \st -> st{ mwInTT = inTT }
573 TagOpen "hask" _ -> B.codeWith ("",["haskell"],[]) <$> charsInTags "hask"
580 TagOpen "hask" _ -> B.codeWith ("",["haskell"],[]) <$> charsInTags "hask"
574 _ -> B.rawInline "html" . snd <$> htmlTag (~== tag)
581 _ -> B.rawInline "html" . snd <$> htmlTag (~== tag)
@@ -690,6 +697,8 @@ strong = B.strong <$> nested (inlinesBetween start end)
690doubleQuotes :: PandocMonad m => MWParser m Inlines
697doubleQuotes :: PandocMonad m => MWParser m Inlines
691doubleQuotes = do
698doubleQuotes = do
692 guardEnabled Ext_smart
699 guardEnabled Ext_smart
700+ inTT <- mwInTT <$> getState
693 B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote)
702 B.doubleQuoted <$> nested (inlinesBetween openDoubleQuote closeDoubleQuote)
694 where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar
703 where openDoubleQuote = sym "\"" >> lookAhead nonspaceChar
695 closeDoubleQuote = try $ sym "\""
704 closeDoubleQuote = try $ sym "\""