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
Relax rules for documentation comments #1820
Comments
This is super easy to implement, so I can send a PR, but preferably not until #1770 is merged. |
👍! I thought that's the way it worked already actually (just taking pipe-prefixed lines). |
TIL, that every line has to be prefixed with a pipe (not like in haskell, where it's only the first line, and the subsequent pipes would appear in the docs) |
Hmm, we should probably document this somewhere. Language Guide? |
@hdgarrood Differences-from-haskell page also wouldn't hurt. I find it intuitive that every line has to have a pipe, and I thought that it's not the case only because of Haskell knowledge (in Haskell I've ended up with lots of bars in my docstrings a few times) |
👍 |
👍 |
Relax rules for docs comments, fixes #1820
Currently, all of the documentation lines before a declaration must begin with a pipe character for those comments to be considered documentation (which determines whether they show up in
psc-docs
and pursuit).This means that lots of documentation gets accidentally lost. For instance,
slice
fromarrays
:The documentation disappears because of the preceding "Subarrays" comment.
I propose that instead of requiring every line starts with a pipe, we simply take only those that start with a pipe. I doubt that this would lead to us including anything that people didn't intend to include - I don't consider this change very risky.
See also the relevant source:
purescript/src/Language/PureScript/Docs/Convert.hs
Lines 201 to 218 in a0b92c7
The text was updated successfully, but these errors were encountered: