Zulip Chat Archive
Stream: general
Topic: plainDocComment
Asei Inoue (Sep 23 2025 at 08:31):
what is the difference between docComment and plainDocComment?
Henrik Böving (Sep 23 2025 at 08:33):
From the docstring of docComment:
/--
A `docComment` parses a "documentation comment" like `/-- foo -/`. This is not treated like
a regular comment (that is, as whitespace); it is parsed and forms part of the syntax tree structure.
At parse time, `docComment` checks the value of the `doc.verso` option. If it is true, the contents
are parsed as Verso markup. If not, the contents are treated as plain text or Markdown. Use
`plainDocComment` to always treat the contents as plain text.
A plain text doc comment node contains a `/--` atom and then the remainder of the comment, `foo -/`
in this example. Use `TSyntax.getDocString` to extract the body text from a doc string syntax node.
A Verso comment node contains the `/--` atom, the document's syntax tree, and a closing `-/` atom.
-/
Asei Inoue (Sep 24 2025 at 05:48):
Thank you!
Last updated: Dec 20 2025 at 21:32 UTC