@@ -112,54 +112,19 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
112
112
def validationLink (str : String ): String =
113
113
def asValidURL = Try (URL (str)).toOption.map(_ => str)
114
114
115
- def asAsset =
116
- Option .when(
117
- Files .exists(Paths .get(" src/main/ressources" ).resolve(str.stripPrefix(" /" )))
118
- )(
119
- s " src/main/ressources/ $str"
120
- )
121
-
122
- def asStaticSite : Option [String ] =
123
- Option .when(
124
- Files .exists(Paths .get(" docs/_docs" ).resolve(str.stripPrefix(" /" )))
125
- )(
126
- s " docs/_docs/ $str"
127
- )
128
-
129
- def asApiLink : Option [String ] =
130
- val strWithoutHtml = if str.endsWith(" $.html" ) then
131
- str.stripSuffix(" $.html" )
132
- else
133
- str.stripSuffix(" .html" )
134
- val sourceDir = Paths .get(" src" , " main" , " scala" )
135
- val scalaPath = sourceDir.resolve(s " $strWithoutHtml.scala " )
136
- val scalaDirPath = sourceDir.resolve(strWithoutHtml)
137
- Option .when(
138
- Files .exists(scalaPath) || Files .exists(scalaDirPath))
139
- (
140
- s " api/ $strWithoutHtml.html "
141
- )
142
-
115
+ def asAsset : Option [String ] = Option .when(
116
+ Files .exists(Paths .get(" docs/_assets" ).resolve(str))
117
+ )(
118
+ s " docs/_assets/ $str"
119
+ )
143
120
144
121
asValidURL
145
- .orElse(asStaticSite)
146
122
.orElse(asAsset)
147
- .orElse(asApiLink)
148
123
.getOrElse{
149
124
report.warning(s " Unable to resolve link ' $str' " )
150
125
str
151
126
}
152
127
153
- // println(asValidURL)
154
-
155
- // println(Paths.get("src/main/ressources").resolve(str.stripPrefix("/")).toAbsolutePath)
156
- // println(Files.exists(Paths.get("src/main/ressources").resolve(str.stripPrefix("/"))))
157
- // def asAsset = Option.when(
158
- // Files.exists(Paths.get("docs/_assets").resolve(str.stripPrefix("/")))
159
- // )(
160
- // s"docs/_assets/$str"
161
- // )
162
-
163
128
def memberInfo (m : Member , withBrief : Boolean = false , full : Boolean = false ): Seq [AppliedTag ] =
164
129
val comment = m.docs
165
130
val bodyContents = m.docs.fold(Nil )(e => renderDocPart(e.body) :: Nil )
@@ -189,14 +154,6 @@ class MemberRenderer(signatureRenderer: SignatureRenderer)(using DocContext) ext
189
154
element.attr(" src" , validationLink(element.attr(" src" )))
190
155
)
191
156
192
- document.select(" a" ).forEach(element =>
193
- element.attr(" href" , processLocalLinkWithGuard(element.attr(" href" )))
194
- )
195
-
196
- // document2.select("a").forEach(element =>
197
- // println("BONJOUR"+element.attr("href"))
198
- // ) <--- Take some href that I don't want
199
-
200
157
Seq (
201
158
Option .when(withBrief && comment.flatMap(_.short).nonEmpty)(div(cls := " documentableBrief doc" )(comment.flatMap(_.short).fold(" " )(renderDocPart))),
202
159
Option .when(bodyContents.nonEmpty || attributes.nonEmpty)(
0 commit comments