Skip to content

Commit ee3f175

Browse files
Lucas LeblancKordyjan
Lucas Leblanc
authored andcommitted
Fix: Style for wiki syntax
The goal of this PR is to correct the style for wiki syntax when the -comment-syntax:wiki is activate. I have 2 possibilities: First-Change the tag(Done on this PR): So when the correct syntax is called I change the tag to strong,em,etc.. instead of using a span with a class. Second-Change the CSS: We keep the span with a class and we add the correct CSS associated to the class. [Cherry-picked ebd164c]
1 parent 5919c59 commit ee3f175

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

scaladoc/src/dotty/tools/scaladoc/renderers/DocRenderer.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ class DocRender(signatureRenderer: SignatureRenderer)(using DocContext):
7979
case UnorderedList(items) => ul(listItems(items))
8080
case OrderedList(items, style) => ol(listItems(items)) // TODO use style
8181
case Chain(items: Seq[Inline]) => span(items.map(renderElement))
82-
case Italic(text) => span(cls:="italic")(renderElement(text))
82+
case Italic(text) => em(renderElement(text))
8383
case Underline(text) => span(cls:="underline")(renderElement(text))
84-
case Bold(text) => span(cls:="bold")(renderElement(text))
84+
case Bold(text) => strong(renderElement(text))
8585
case Monospace(text) => code(renderElement(text))
8686
case Superscript(text) => span(cls:="superscript")(renderElement(text)) // TODO implement style
8787
case Subscript(text) => span(cls:="subscript")(renderElement(text)) // TODO implement style

scaladoc/src/dotty/tools/scaladoc/util/html.scala

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ object HTML:
5151

5252
val div = Tag("div")
5353
val span = Tag("span")
54+
val em = Tag("em")
55+
val strong = Tag("strong")
5456
val a = Tag("a")
5557
val p = Tag("p")
5658
val h1 = Tag("h1")

0 commit comments

Comments
 (0)