Skip to content
This repository was archived by the owner on Apr 24, 2021. It is now read-only.

Commit 1575ba2

Browse files
amiraliescristianoc
authored andcommitted
Support syntax highlight in hover fenced blocks
1 parent ace1c2b commit 1575ba2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/rescript-editor-support/Hover.re

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ let showModuleTopLevel =
3636
)
3737
|> String.concat("\n");
3838
let full = "module " ++ name ++ " = {" ++ "\n" ++ contents ++ "\n}";
39-
Some(markdown ? "```\n" ++ full ++ "\n```" : full);
39+
Some(markdown ? "```rescript\n" ++ full ++ "\n```" : full);
4040
};
4141

4242
let showModule =
@@ -114,7 +114,8 @@ let newHover =
114114
/* Some(typ.toString()) */
115115
};
116116

117-
let codeBlock = text => markdown ? "```\n" ++ text ++ "\n```" : text;
117+
let codeBlock = text =>
118+
markdown ? "```rescript\n" ++ text ++ "\n```" : text;
118119
let typeString = codeBlock(typeString);
119120
let typeString =
120121
typeString

0 commit comments

Comments
 (0)