Skip to content

Commit 82c8023

Browse files
committed
Do backticks for inline math and fenced latex blocks for math blocks
1 parent 74a72ae commit 82c8023

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ghcide/src/Development/IDE/Spans/Common.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,9 +191,9 @@ haddockToMarkdown (H.DocDefList things)
191191
= '\n' : (unlines $ map (\(term, defn) -> "+ **" ++ haddockToMarkdown term ++ "**: " ++ haddockToMarkdown defn) things)
192192

193193
haddockToMarkdown (H.DocMathInline s)
194-
= "$" ++ s ++ "$"
194+
= "`" ++ s ++ "`"
195195
haddockToMarkdown (H.DocMathDisplay s)
196-
= "\n$$\n" ++ s ++ "\n$$\n"
196+
= "\n```latex\n" ++ s ++ "\n```\n"
197197

198198
-- TODO: render tables
199199
haddockToMarkdown (H.DocTable _t)

0 commit comments

Comments
 (0)