-
-
Notifications
You must be signed in to change notification settings - Fork 369
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hover format #2911
Fix hover format #2911
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we get some comments explaining the place where we need to be careful about newlines? Otherwise we're going to lose the knowledge you just generated!
++ catMaybes [ T.unlines . spanDocToMarkdown <$> lookupNameEnv dm n | ||
] | ||
where maybeKind = fmap printOutputable $ safeTyThingType =<< lookupNameEnv km n | ||
pretty Nothing Nothing = Nothing | ||
pretty (Just define) Nothing = Just $ define <> "\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completely independent of this PR, but I wonder if we'd make our lives easier by using prettyprinter
for some of this stuff 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unfortunately, I have little knowledge about prettyprinter
... Maybe I'll improve this someday or any other can pick this...
Yes! all markdown-based content should be treat with care, I'll push more comment to explain what happened now. |
* Fix hover format * Test with regex * Add comments about inserting a new line in Markdown
Close #2863.
It is because markdown newline requires two '\n' but a separate section only needs one '\n'.