Skip to content

Commit 9ffd965

Browse files
committed
Add an example doc comment with code block
See #522
1 parent 1572f81 commit 9ffd965

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

analysis/tests/src/Hover.res

+11-2
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,20 @@ let arity0d = (. ()) => {
139139
f
140140
}
141141

142-
/**doc comment 1*/
142+
/**doc comment `1` one */
143143
let docComment1 = 12
144144
// ^hov
145145

146-
/** doc comment 2 */
146+
/**
147+
Doc comment with a triple-backquote example
148+
149+
```res example
150+
let a = 10
151+
/*
152+
* stuff
153+
*/
154+
```
155+
*/
147156
let docComment2 = 12
148157
// ^hov
149158

analysis/tests/src/expected/Hover.res.txt

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ Hover src/Hover.res 135:5
9999
{"contents": "```rescript\n(. ()) => unit => int\n```"}
100100

101101
Hover src/Hover.res 142:9
102-
{"contents": "```rescript\nint\n```\n\ndoc comment 1"}
102+
{"contents": "```rescript\nint\n```\n\ndoc comment `1` one "}
103103

104-
Hover src/Hover.res 146:6
105-
{"contents": "```rescript\nint\n```\n\n doc comment 2 "}
104+
Hover src/Hover.res 155:6
105+
{"contents": "```rescript\nint\n```\n\nDoc comment with a triple-backquote example\n\ns example\n a = 10\n\nstuff\n\n"}
106106

0 commit comments

Comments
 (0)