Skip to content
This repository has been archived by the owner on Jan 2, 2021. It is now read-only.

Enhancements to Haddock -> Markdown conversion #344

Merged
merged 8 commits into from
Jan 27, 2020

Conversation

serras
Copy link
Contributor

@serras serras commented Jan 24, 2020

Fixes #341

@ndmitchell
Copy link
Collaborator

Any chance of some tests? I could imagine future changes breaking some of the more subtle bits.

@serras
Copy link
Contributor Author

serras commented Jan 24, 2020

I can try, but I've already had the problem that the documentation from packages changes from version to version. I'm planning to have a look at #7 and #270, and then we can write tests which reference files in the project itself.

@ndmitchell
Copy link
Collaborator

I was thinking just a pure function, so take the Show of the DocH for unsafePerformIO as it stands today, paste it in as a test, and paste the current output as a string, and confirm that the conversion takes one to the other.

@serras
Copy link
Contributor Author

serras commented Jan 24, 2020

That makes sense. I'll write some of them during the weekend.

@serras
Copy link
Contributor Author

serras commented Jan 24, 2020

@ndmitchell the tests are in. Let me tell you what you think. Right now I've chosen two of the "hardest" ones: Num and unsafePerformIO, since they involve lists and mixed code.

@ndmitchell
Copy link
Collaborator

Tests look great! Thanks for doing that.

Copy link
Contributor

@moodmosaic moodmosaic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I pulled this on my local and I can verify that this fixes #341. Thank you, @serras. 💯

image


Still, adding some tests should be nice, as @ndmitchell suggested. If no similar tests are in place though, perhaps we should merge and add those separately.

Copy link
Collaborator

@cocreature cocreature left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Pushed a small change to make the tests a bit more readable.

@cocreature cocreature merged commit 956e11d into haskell:master Jan 27, 2020
pepeiborra pushed a commit to pepeiborra/ghcide that referenced this pull request Feb 1, 2020
* Enhancements to Haddock -> Markdown conversion

* Add tests for Haddock -> Markdown conversion

* Make HLint happy

* Let Haddock tests compile also in 8.4

* Fix build for 8.4

* Fix test for haddock-library 1.8.0

* Fix CPP problem

* Make tests a bit more readable

Co-authored-by: Moritz Kiefer <[email protected]>
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Enhancements to Haddock -> Markdown conversion

* Add tests for Haddock -> Markdown conversion

* Make HLint happy

* Let Haddock tests compile also in 8.4

* Fix build for 8.4

* Fix test for haddock-library 1.8.0

* Fix CPP problem

* Make tests a bit more readable

Co-authored-by: Moritz Kiefer <[email protected]>
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Enhancements to Haddock -> Markdown conversion

* Add tests for Haddock -> Markdown conversion

* Make HLint happy

* Let Haddock tests compile also in 8.4

* Fix build for 8.4

* Fix test for haddock-library 1.8.0

* Fix CPP problem

* Make tests a bit more readable

Co-authored-by: Moritz Kiefer <[email protected]>
pepeiborra pushed a commit to pepeiborra/ide that referenced this pull request Dec 29, 2020
* Enhancements to Haddock -> Markdown conversion

* Add tests for Haddock -> Markdown conversion

* Make HLint happy

* Let Haddock tests compile also in 8.4

* Fix build for 8.4

* Fix test for haddock-library 1.8.0

* Fix CPP problem

* Make tests a bit more readable

Co-authored-by: Moritz Kiefer <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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