Skip to content

Commit

Permalink
Start line indexing from 1
Browse files Browse the repository at this point in the history
  • Loading branch information
pikinier20 committed Jul 7, 2022
1 parent e82d4b5 commit 6f754b1
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ case class SnippetLine(content: String, lineNo: Int, classes: Set[String] = Set.
def withAttribute(name: String, value: String) = this.copy(attributes = attributes.updated(name, value))
def toHTML =
val label = if messages.nonEmpty then s"""label="${messages.map(_.escapeReservedTokens).mkString("\n")}"""" else ""
s"""<span line-number="${lineNo}" class="${classes.mkString(" ")}"><span class="tooltip-container" $label></span>$content</span>"""
s"""<span line-number="${lineNo + 1}" class="${classes.mkString(" ")}"><span class="tooltip-container" $label></span>$content</span>"""

object SnippetRenderer:
val hiddenStartSymbol = "//{"
Expand Down

0 comments on commit 6f754b1

Please sign in to comment.