@@ -51,7 +51,7 @@ import Text.Pandoc.Options (ReaderOptions(readerParseRaw, readerTrace)
51import Text.Pandoc.Parsing hiding ((<|>))
51import Text.Pandoc.Parsing hiding ((<|>))
52import Text.Pandoc.Walk
52import Text.Pandoc.Walk
53import Data.Maybe ( fromMaybe, isJust)
53import Data.Maybe ( fromMaybe, isJust)
54−import Data.List ( intercalate, isInfixOf, isPrefixOf )
54+import Data.List ( intercalate, isInfixOf, isPrefixOf, isSuffixOf )
55import Data.Char ( isDigit )
55import Data.Char ( isDigit )
56import Control.Monad ( liftM, guard, when, mzero, void, unless )
56import Control.Monad ( liftM, guard, when, mzero, void, unless )
57import Control.Arrow ((***))
57import Control.Arrow ((***))
@@ -874,7 +874,7 @@ htmlInBalanced :: (Monad m)
874 -> ParserT String st m String
874 -> ParserT String st m String
875htmlInBalanced f = try $ do
875htmlInBalanced f = try $ do
876 (TagOpen t _, tag) <- htmlTag f
876 (TagOpen t _, tag) <- htmlTag f
877− guard $ '/' `notElem` tag -- not a self-closing tag
877+ guard $ not $ "/>" `isSuffixOf` tag -- not a self-closing tag
878 let stopper = htmlTag (~== TagClose t)
878 let stopper = htmlTag (~== TagClose t)
879 let anytag = snd <$> htmlTag (const True)
879 let anytag = snd <$> htmlTag (const True)
880 contents <- many $ notFollowedBy' stopper >>
880 contents <- many $ notFollowedBy' stopper >>