Skip to content
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

Scaladoc: Unescaped special characters in Quotes documentation #14377

Merged
merged 1 commit into from
Feb 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions scaladoc-testcases/src/tests/markdowncode.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package tests.markdowncode

/** Some text `{ <statements: List[Statement]>; <expr: Term> }` */
val aVal: Float
= 1.2f
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ class DocRender(signatureRenderer: SignatureRenderer)(using DocContext):
case Subscript(text) => span(cls:="subscript")(renderElement(text)) // TODO implement style
case Link(target, body) =>
renderLink(target, default => body.fold[TagArg](default)(renderElement))
case Text(text) => raw(text)
case Text(text) => raw(text.escapeReservedTokens)
case Summary(text) => renderElement(text)
case HtmlTag(content) => raw(content)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,3 +92,5 @@ class FBoundedTypeParameters extends SignatureTest("fboundedTypeParameters", Sig
class Exports extends SignatureTest("exports2", SignatureTest.all, sourceFiles = List("exports1", "exports2"))

class ContextFunctions extends SignatureTest("contextfunctions", SignatureTest.all)

class MarkdownCode extends SignatureTest("markdowncode", SignatureTest.all)
Comment on lines +95 to +96
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK this test checks only signatures, it doesn't check comment contents.