@@ -7,28 +7,15 @@ import com.vladsch.flexmark.util.sequence.CharSubSequence
7
7
import model .{ Package , NonEntity , Val , Def , TypeAlias }
8
8
import dottydoc .util .MemberLookup
9
9
10
- import dotty .tools .dotc .core .Contexts .Context
11
- import dotty .tools .dotc .core .Decorators ._
12
-
13
10
object MarkdownLinkVisitor {
14
11
private val EntityLink = """ ([^\.]+)(\.[^\.]+)*""" .r
15
- def apply (node : Node , docs : Map [String , Package ], params : Map [String , AnyRef ])( implicit ctx : Context ) : Unit =
12
+ def apply (node : Node , docs : Map [String , Package ], params : Map [String , AnyRef ]): Unit =
16
13
(new NodeVisitor (
17
14
new VisitHandler (classOf [Link ], new Visitor [Link ] with MemberLookup {
18
15
override def visit (node : Link ): Unit = {
19
16
val url = node.getUrl
20
-
21
- if (url.endsWith(" .md" )) {
22
- if (url.subSequence(0 , url.lastIndexOf('.' )).indexOf(" /" ) < 0 ) {
23
- val method = url.subSequence(0 , url.lastIndexOf('.' )).toString.toTypeName
24
- if (ctx.getClassIfDefined(method).exists) node.setUrl {
25
- url.subSequence(0 , url.lastIndexOf('.' )).append(" .html" )
26
- } else {
27
- ctx.error(s """ Ambiguous reference to " $url" """ )
28
- }
29
- } else node.setUrl {
30
- url.subSequence(0 , url.lastIndexOf('.' )).append(" .html" )
31
- }
17
+ if (url.endsWith(" .md" )) node.setUrl {
18
+ url.subSequence(0 , url.lastIndexOf('.' )).append(" .html" )
32
19
}
33
20
else if (EntityLink .unapplySeq(url.toString).isDefined) {
34
21
lookup(NonEntity , docs, url.toString).foreach { ent =>
0 commit comments