File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
ghcide/src/Development/IDE Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -204,7 +204,7 @@ mkCompl
204
204
where kind = Just compKind
205
205
docs' = imported : spanDocToMarkdown docs
206
206
imported = case provenance of
207
- Local pos -> " *Defined at " <> pprLineCol (srcSpanStart pos) <> " in this module*\n ' "
207
+ Local pos -> " *Defined at " <> pprLineCol (srcSpanStart pos) <> " in this module*\n "
208
208
ImportedFrom mod -> " *Imported from '" <> mod <> " '*\n "
209
209
DefinedIn mod -> " *Defined in '" <> mod <> " '*\n "
210
210
colon = if optNewColonConvention then " : " else " :: "
Original file line number Diff line number Diff line change @@ -62,7 +62,9 @@ safeTyThingId _ = Nothing
62
62
-- Possible documentation for an element in the code
63
63
data SpanDoc
64
64
= SpanDocString HsDocString SpanDocUris
65
+ -- ^ Extern module doc
65
66
| SpanDocText [T. Text ] SpanDocUris
67
+ -- ^ Local module doc
66
68
deriving stock (Eq , Show , Generic )
67
69
deriving anyclass NFData
68
70
@@ -78,11 +80,11 @@ emptySpanDoc = SpanDocText [] (SpanDocUris Nothing Nothing)
78
80
79
81
spanDocToMarkdown :: SpanDoc -> [T. Text ]
80
82
spanDocToMarkdown (SpanDocString docs uris)
81
- = [T. pack $ haddockToMarkdown $ H. toRegular $ H. _doc $ H. parseParas Nothing $ unpackHDS docs]
82
- <> [ " \n " ] <> spanDocUrisToMarkdown uris
83
+ = [( T. pack $ haddockToMarkdown $ H. toRegular $ H. _doc $ H. parseParas Nothing $ unpackHDS docs) <> T. pack " \n " ]
84
+ <> spanDocUrisToMarkdown uris
83
85
-- Append the extra newlines since this is markdown --- to get a visible newline,
84
86
-- you need to have two newlines
85
- spanDocToMarkdown (SpanDocText txt uris) = txt <> [" \n " ] <> spanDocUrisToMarkdown uris
87
+ spanDocToMarkdown (SpanDocText txt uris) = map ( <> T. pack " \n " ) txt <> [" \n " ] <> spanDocUrisToMarkdown uris
86
88
87
89
spanDocUrisToMarkdown :: SpanDocUris -> [T. Text ]
88
90
spanDocUrisToMarkdown (SpanDocUris mdoc msrc) = catMaybes
You can’t perform that action at this time.
0 commit comments