File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
ghcide/src/Development/IDE/Spans Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -51,9 +51,7 @@ safeTyThingId _ = Nothing
5151-- Possible documentation for an element in the code
5252data SpanDoc
5353 = SpanDocString HsDocString SpanDocUris
54- -- ^ Extern module doc
5554 | SpanDocText [T. Text ] SpanDocUris
56- -- ^ Local module doc
5755 deriving stock (Eq , Show , Generic )
5856 deriving anyclass NFData
5957
@@ -80,6 +78,11 @@ emptySpanDoc = SpanDocText [] (SpanDocUris Nothing Nothing)
8078-- it will result "xxxx---\nyyyy" and can't be rendered as a normal doc.
8179-- Therefore we check every item in the value to make sure they all end with '\\n',
8280-- 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").
8386spanDocToMarkdown :: SpanDoc -> [T. Text ]
8487spanDocToMarkdown = \ case
8588 (SpanDocString docs uris) ->
You can’t perform that action at this time.
0 commit comments