Skip to content

Commit 6f754b1

Browse files
committed
Start line indexing from 1
1 parent e82d4b5 commit 6f754b1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scaladoc/src/dotty/tools/scaladoc/tasty/comments/markdown/SnippetRenderer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ case class SnippetLine(content: String, lineNo: Int, classes: Set[String] = Set.
1111
def withAttribute(name: String, value: String) = this.copy(attributes = attributes.updated(name, value))
1212
def toHTML =
1313
val label = if messages.nonEmpty then s"""label="${messages.map(_.escapeReservedTokens).mkString("\n")}"""" else ""
14-
s"""<span line-number="${lineNo}" class="${classes.mkString(" ")}"><span class="tooltip-container" $label></span>$content</span>"""
14+
s"""<span line-number="${lineNo + 1}" class="${classes.mkString(" ")}"><span class="tooltip-container" $label></span>$content</span>"""
1515

1616
object SnippetRenderer:
1717
val hiddenStartSymbol = "//{"

0 commit comments

Comments
 (0)