You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, we have encountered a surprising behavior after using odoc-parser 0.9.0 (ocaml-ppx/ocamlformat#1719), it looks like after parsing a tag, the following paragraphs are added to the list of paragraphs of said tag.
There is a corresponding test in odoc-parser's testbase:
Looking at the docs here it seems that the @deprecated tag is followed by text which includes blank lines separating paragraphs. My reading of that is that the test case is correct - what do you think?
I had the feeling (and some other people too, based on the way they wrote their doc comments) that since the bar line was separated with 2 linebreaks from the @deprecated foo tag (and indented on the same column, but I don't know if relevant), then it would be considered a different item instead of being a child of this tag.
@deprecated foo
bar // same item
@deprecated foo
bar // different item
Or maybe there is something in the odoc grammar to indicate the end of a paragraph attached to a tag?
It seems to me that the expectation is that tags are at the end of doc comments - see the comment here. As such I think there's no way to return a result looking like [ Paragraph _; Tag _; Paragraph _ ]
Activity
jonludlam commentedon Jul 13, 2021
Looking at the docs here it seems that the
@deprecatedtag is followed by text which includes blank lines separating paragraphs. My reading of that is that the test case is correct - what do you think?gpetiot commentedon Jul 13, 2021
I had the feeling (and some other people too, based on the way they wrote their doc comments) that since the
barline was separated with 2 linebreaks from the@deprecated footag (and indented on the same column, but I don't know if relevant), then it would be considered a different item instead of being a child of this tag.Or maybe there is something in the odoc grammar to indicate the end of a paragraph attached to a tag?
jonludlam commentedon Jul 13, 2021
It seems to me that the expectation is that tags are at the end of doc comments - see the comment here. As such I think there's no way to return a result looking like
[ Paragraph _; Tag _; Paragraph _ ]gpetiot commentedon Jul 14, 2021
Alright if that's expected I'm happy to close this issue then, thanks!