aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/Haddock/Parse.y8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/Haddock/Parse.y b/src/Text/Pandoc/Readers/Haddock/Parse.y
index c45e09113..e34f9d95e 100644
--- a/src/Text/Pandoc/Readers/Haddock/Parse.y
+++ b/src/Text/Pandoc/Readers/Haddock/Parse.y
@@ -76,7 +76,7 @@ defpara :: { (Inlines, [Blocks]) }
para :: { Blocks }
: seq { para' $1 }
- | codepara { codeBlock $1 }
+ | codepara { codeBlockWith ([], ["haskell"], []) $1 }
| property { $1 }
| examples { $1 }
@@ -118,8 +118,8 @@ elem1 :: { Inlines }
| URL { makeHyperlink $1 }
| PIC { image $1 $1 mempty }
| ANAME { mempty } -- TODO
- | IDENT { code $1 }
- | DQUO strings DQUO { code $2 }
+ | IDENT { codeWith ([], ["haskell"], []) $1 }
+ | DQUO strings DQUO { codeWith ([], ["haskell"], []) $2 }
strings :: { String }
: STRING { $1 }
@@ -162,7 +162,7 @@ makeProperty s = case strip s of
-- | Create an 'Example', stripping superfluous characters as appropriate
makeExample :: String -> String -> [String] -> Blocks
makeExample prompt expression result =
- para $ codeWith ([], ["expr"], []) (strip expression ++ "\n")
+ para $ codeWith ([], ["haskell", "expr"], []) (strip expression ++ "\n")
<> codeWith ([], ["result"], []) (unlines result')
where
-- 1. drop trailing whitespace from the prompt, remember the prefix