File tree 1 file changed +5
-2
lines changed
ghcide/src/Development/IDE/Spans
1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ safeTyThingId _ = Nothing
51
51
-- Possible documentation for an element in the code
52
52
data SpanDoc
53
53
= SpanDocString HsDocString SpanDocUris
54
- -- ^ Extern module doc
55
54
| SpanDocText [T. Text ] SpanDocUris
56
- -- ^ Local module doc
57
55
deriving stock (Eq , Show , Generic )
58
56
deriving anyclass NFData
59
57
@@ -80,6 +78,11 @@ emptySpanDoc = SpanDocText [] (SpanDocUris Nothing Nothing)
80
78
-- it will result "xxxx---\nyyyy" and can't be rendered as a normal doc.
81
79
-- Therefore we check every item in the value to make sure they all end with '\\n',
82
80
-- this makes "xxxx\n---\nyyy\n" and can be rendered correctly.
81
+ --
82
+ -- Notes:
83
+ --
84
+ -- To insert a new line in Markdown, we need two '\\n', like ("\\n\\n"), __or__ a section
85
+ -- symbol with one '\\n', like ("***\\n").
83
86
spanDocToMarkdown :: SpanDoc -> [T. Text ]
84
87
spanDocToMarkdown = \ case
85
88
(SpanDocString docs uris) ->
You can’t perform that action at this time.
0 commit comments