Skip to content

Commit bed1eff

Browse files
committed
Add Doctype to the scaladoc files to be in standard mode
Add Doctype Correction Correct
1 parent aa079a5 commit bed1eff

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

docs/_layouts/base.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
<link rel="dns-prefetch" href="//fonts.googleapis.com">
22
<link rel="preconnect" href="https://cdnjs.cloudflare.com" crossorigin>
33
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
4-
5-
{{ content }}
4+
{{ content }}

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,18 @@ class HtmlRenderer(rootPackage: Member, members: Map[DRI, Member])(using ctx: Do
4141
case _ => Nil)
4242
:+ (Attr("data-pathToRoot") := pathToRoot(page.link.dri))
4343

44-
html(attrs: _*)(
44+
val htmlTag = html(attrs: _*)(
4545
head((mkHead(page) :+ docHead):_*),
4646
body(
4747
if !page.hasFrame then docBody
4848
else mkFrame(page.link, parents, docBody, toc)
4949
)
5050
)
5151

52+
val doctypeTag = s"<!DOCTYPE html>"
53+
val finalTag = raw(doctypeTag + htmlTag.toString)
54+
finalTag
55+
5256
override def render(): Unit =
5357
val renderedResources = renderResources()
5458
super.render()

0 commit comments

Comments
 (0)