Skip to content

Scaladoc: special characters not escaped in filename generated by the Scaladoc (sbt doc) #14612

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

Closed
PaulCoral opened this issue Mar 2, 2022 · 0 comments · Fixed by #14657
Closed
Assignees
Milestone

Comments

@PaulCoral
Copy link
Contributor

PaulCoral commented Mar 2, 2022

Scala3's Scaladoc generate HTML files without escaping special character which lead inaccessible files when hosted by some site, like Github Pages (404 Error).
Two cases can cause this :

  • Declaring things at top level (not in a package) which declare the <empty> package in Scaladoc. An example here
  • Declaring an class/case class/object/... with special characters like ~. Another example there

Here are also a link to the repository and a link to the root page of the corresponding example Scaladoc. One can browse to see that links to these inaccesible files are generated by the scaladoc.

This scaladoc is generated by the following Github Action

(This is not the case in Scala2)

Compiler version

3.1.1 (but also reproducible on previous Scala3 versions)

Minimized example

case class ~>~()

run sbt doc

Output

A file like ~>~.html

Expectation

A file like $tilde$greater$tilde.html

@PaulCoral PaulCoral added the stat:needs triage Every issue needs to have an "area" and "itype" label label Mar 2, 2022
@TheElectronWill TheElectronWill added area:doctool itype:bug and removed stat:needs triage Every issue needs to have an "area" and "itype" label labels Mar 3, 2022
@jchyb jchyb self-assigned this Mar 9, 2022
@Kordyjan Kordyjan added this to the 3.2.0 milestone Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants