Ghcide: Some parts of the doc info (on hover) are incorrectly wrapped inside code tags

Created on 23 Jan 2020  路  3Comments  路  Source: haskell/ghcide

The overall feature looks neat, but some parts of the :doc are incorrectly wrapped in <code></code>

image

As @serras points out, the origin of this may be at the transform of Haddock into Markdown.


Should this be reported in https://github.com/haskell/haddock instead, please let me know.

Most helpful comment

I really think this is on our side, since the comment in unsafePerformIO is valid Haddock. I've put up a fix in #344, which seems to render those docs correctly and not break anything else.

All 3 comments

This seems to be caused by the fact that the docs for unsafePerformIO read as follows:

  * Use @{\-\# NOINLINE foo \#-\}@ as a pragma on any function @foo@
        that calls 'unsafePerformIO'.  If the call is inlined,
        the I\/O may be performed more than once.

Unfortunately, having so many spaces before a line is parsed by Markdown as being a code block, hence the problem.

Oh, I guess we can send them a pull request :wink: Thank you for looking into it :100:

I really think this is on our side, since the comment in unsafePerformIO is valid Haddock. I've put up a fix in #344, which seems to render those docs correctly and not break anything else.

Was this page helpful?
0 / 5 - 0 ratings