Skip to content

Commit 0bf3905

Browse files
Florian3kKordyjan
authored andcommitted
fix NoSuchElementException in scaladoc
[Cherry-picked ec41e3f]
1 parent fb7e806 commit 0bf3905

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ object SectionRenderingExtension extends HtmlRenderer.HtmlRendererExtension:
3333
val Section(header, body) = node
3434
val idSuffix = repeatedIds.getOrElseUpdate((c, header.getText), 0)
3535
val ifSuffixStr = if(idSuffix == 0) then "" else idSuffix.toString
36-
repeatedIds.update((c, header.getText), repeatedIds((c, header.getText)) + 1)
36+
repeatedIds.update((c, header.getText), idSuffix + 1)
3737
val id = idGenerator.getId(header.getText.append(ifSuffixStr))
3838
val anchor = AnchorLink(s"#$id")
3939
val headerClass: String = header.getLevel match

0 commit comments

Comments
 (0)