Skip to content

CommentSyntax setting should be path based #14596

Closed
@pikinier20

Description

@pikinier20

The -comment-syntax setting tells Scaladoc whether the docstrings are written in Markdown or Wiki syntax. For now, the comment syntax setting can only be set globally for entire project. In Dotty we have the Scala 2.13 standard library which uses Wiki syntax and Scala 3 standard library which uses Markdown.

Currently we use the Wiki syntax for entire project because Wiki parser handles Markdown quite well.

Having in mind that new comments should be written in Markdown syntax, there are few features that work only with Markdown (e.g. snippet compiler) and therefore it would be nice if we could set correct syntaxes for specific libraries in Dotty.

Also, it might help in migration process of other libraries from Scala 2 to Scala 3.

The implementation should be easy because there's PathBased abstraction that is already used for source links and snippet compiler. Using this abstraction we can decide which syntax should be used based on the path to the class file.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions