@@ -618,12 +618,19 @@ codeBlockFenced = try $ do
618618 skipMany spaceChar
619619 attr <- option ([],[],[]) $
620620 try (guardEnabled Ext_fenced_code_attributes >> attributes)
621− <|> ((\x -> ("",[x],[])) <$> identifier)
621+ <|> ((\x -> ("",[toLanguageId x],[])) <$> many1 nonspaceChar)
622622 blankline
623623 contents <- manyTill anyLine (blockDelimiter (== c) (Just size))
624624 blanklines
625625 return $ return $ B.codeBlockWith attr $ intercalate "\n" contents
626626
627+-- correctly handle github language identifiers
628+toLanguageId :: String -> String
629+toLanguageId = map toLower . go
630+ where go "c++" = "cpp"
631+ go "objective-c" = "objectivec"
632+ go x = x
633+
627634codeBlockIndented :: MarkdownParser (F Blocks)
628635codeBlockIndented = do
629636 contents <- many1 (indentedLine <|>