@@ -507,6 +507,7 @@ directive' = do
507507 let body' = body ++ "\n\n"
508508 case label of
509509 "raw" -> return $ B.rawBlock (trim top) (stripTrailingNewlines body)
510+ "role" -> return mempty
510511 "container" -> parseFromString parseBlocks body'
511512 "replace" -> B.para <$> -- consumed by substKey
512513 parseFromString (trimInlines . mconcat <$> many inline)
@@ -856,6 +857,7 @@ inline = choice [ whitespace
856857 , superscript
857858 , subscript
858859 , math
860+ , interpretedRole
859861 , note
860862 , smart
861863 , hyphens
@@ -921,9 +923,16 @@ interpreted role = try $ do
921923 -- Note, this doesn't precisely implement the complex rule in
922924 -- http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#inline-markup-recognition-rules
923925 -- but it should be good enough for most purposes
924− unmarkedInterpretedText = do
925− result <- enclosed (atStart $ char '`') (char '`') anyChar
926− return result
926+
927+unmarkedInterpretedText :: RSTParser [Char]
928+unmarkedInterpretedText = enclosed (atStart $ char '`') (char '`') anyChar
929+
930+-- For unknown interpreted roles, we just ignore the role.
931+interpretedRole :: RSTParser Inlines
932+interpretedRole = try $ B.str <$>
933+ ( (roleMarker *> unmarkedInterpretedText)
934+ <|> (unmarkedInterpretedText <* roleMarker) )
935+ where roleMarker = char ':' *> many1Till (letter <|> char '-') (char ':')
927936
928937superscript :: RSTParser Inlines
929938superscript = B.superscript . B.str <$> interpreted "sup"