Skip to content

Support comments parameter #20

@alexander-yevsyukov

Description

@alexander-yevsyukov

Sometimes it is needed to embed the code of the whole interface or class declaration, but to show only its API entry points.
Showing all the code with the Javadoc or KDoc comments is overwhelming in such a scenario. We don't want the reader to read all those API docs while reading the text of the documentation.

The comments parameter would serve such a need. It will allow embed-code to show the code without all the comments.

The tag would look like this:

<embed-code
  file="$runtime/src/main/java/io/spine/validation/ValidatingBuilder.java"
  start="public interface ValidatingBuilder"
  end="^\}"
  comments="false">
</embed-code>

Possible values for the comment paraneter:

  • "false" — all comments are stripped
  • "true" — all comments are retained
  • "documentation" — Javadoc, KDoc, and similar API-level comments are passed
  • "end-of-line" — such as // are kept
  • "block" — comments like /* */ are retained, others are stripped.

Metadata

Metadata

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions