@@ -736,10 +736,19 @@ rawTeXBlock = do
736736 spaces
737737 return $ return result
738738
739+addMarkdownAttribute :: (Tag String, String) -> Parser [Char] ParserState String
740+addMarkdownAttribute (t,s) = do
741+ (guardDisabled Ext_markdown_attribute >> return s)
742+ <|> case t of
743+ TagOpen x attrs
744+ | "markdown" `elem` map fst attrs -> return s
745+ | otherwise -> return $ renderTags [TagOpen x (("markdown","1"):attrs)]
746+ _ -> return s
747+
739748rawHtmlBlocks :: Parser [Char] ParserState String
740749rawHtmlBlocks = do
741750 htmlBlocks <- many1 $ do blk <- rawVerbatimBlock <|>
742− liftM snd (htmlTag isBlockTag)
751+ (htmlTag isBlockTag >>= addMarkdownAttribute)
743752 sps <- do sp1 <- many spaceChar
744753 sp2 <- option "" (blankline >> return "\n")
745754 sp3 <- many spaceChar