You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
API doc directives: accept full character range in package names
According to the [Java Language Specification](https://docs.oracle.com/javase/specs/jls/se8/html/index.html)
member of packages, e.g. subpackages are identifiers. Identifiers itself is
...an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter.
As a `Java letter` includes more than what is expressed by the regex `\b[a-z][a-z0-9_]*)\.`, package names which include uppercase or non ASCII characters cannot be processed. I know that there are some _naming conventions_ flying around but something like `aBc.DE.fg` is still a valid package name in my opinion.
I have changed the regex in `packageDotsToSlash()` to `(\b\p{javaJavaIdentifierStart}\p{javaJavaIdentifierPart}*)\.`. Unfortunately this breaks with the changes applied for issue #397, #395, #98, #86 to handle inner classes. In order to support this notation, the regex can be relaxed to `(\b\p{javaLowerCase}\p{javaJavaIdentifierPart}*)\.`.
I have added the variable 'scaladoc.strictPackageIdent' (which defaults to `false`) by which you can switch between the two regexp. Once set to true, the package name can conform to an identifier now.
The [sbt-paradox-apidoc](https://github.com/lightbend/sbt-paradox-apidoc) plugin creates `@scaladoc` and `@javadoc` API links by searching the class paths for the appropriate class to link to.
89
122
90
123
@@@
91
124
125
+
92
126
#### @javadoc directive
93
127
94
128
Use the `@javadoc` directives to link to Javadoc sites based on the package
@@ -120,6 +154,42 @@ associated with the `java.specification.version` system property.
120
154
121
155
The `@javadoc` directive also supports site root relative base URLs using the `.../` syntax.
122
156
157
+
The directive will identify inner classes and resolve a reference like
158
+
`@javadoc[Flow.Subscriber](java.util.concurrent.Flow.Subscriber)` to
The [sbt-paradox-apidoc](https://github.com/lightbend/sbt-paradox-apidoc) plugin creates `@scaladoc` and `@javadoc` API links by searching the class paths for the appropriate class to link to.
0 commit comments