Skip to content

Commit a1c73e9

Browse files
committed
Define special handling of infix types like "<:<" and "=:="
1 parent c53c115 commit a1c73e9

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

dottydoc/js/src/html/Member.scala

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,15 @@ trait MemberLayout {
117117
ref.kind match {
118118
case "TypeReference" =>
119119
val tref = ref.asInstanceOf[TypeReference]
120-
if (tref.paramLinks.nonEmpty) span(
120+
val infixTypes = "<:<" :: "=:=" :: Nil
121+
if (tref.paramLinks.length == 2 && infixTypes.contains(tref.title)) span(
122+
referenceToLinks(tref.paramLinks(0)),
123+
span(cls := "type-separator no-left-margin"),
124+
linkToAnchor(tref.tpeLink),
125+
span(cls := "type-separator no-left-margin"),
126+
referenceToLinks(tref.paramLinks(1))
127+
).render
128+
else if (tref.paramLinks.nonEmpty) span(
121129
linkToAnchor(tref.tpeLink),
122130
"[",
123131
tref

0 commit comments

Comments
 (0)