@@ -423,7 +423,8 @@ defListItem = try $ do
423423 terms <- mconcat . intersperse B.linebreak <$> many defListTerm
424424 -- we allow dd with no dt, or dt with no dd
425425 defs <- if B.isNull terms
426− then notFollowedBy (try $ string ":<math>") *>
426+ then notFollowedBy
427+ (try $ skipMany1 (char ':') >> string "<math>") *>
427428 many1 (listItem ':')
428429 else many (listItem ':')
429430 return (terms, defs)
@@ -519,7 +520,7 @@ str :: MWParser Inlines
519520str = B.str <$> many1 (noneOf $ specialChars ++ spaceChars)
520521
521522math :: MWParser Inlines
522−math = (B.displayMath . trim <$> try (char ':' >> charsInTags "math"))
523+math = (B.displayMath . trim <$> try (many1 (char ':') >> charsInTags "math"))
523524 <|> (B.math . trim <$> charsInTags "math")
524525 <|> (B.displayMath . trim <$> try (dmStart *> manyTill anyChar dmEnd))
525526 <|> (B.math . trim <$> try (mStart *> manyTill (satisfy (/='\n')) mEnd))