RFR: JDK-8298405: Support Markdown in Documentation Comments [v7]
Pavel Rappo
prappo at openjdk.org
Mon Feb 12 15:57:09 UTC 2024
On Thu, 8 Feb 2024 18:52:54 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:
>> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/markup/RawHtml.java line 145:
>>
>>> 143: }
>>> 144:
>>> 145: Pattern tag = Pattern.compile("<(?<tag>[A-Za-z0-9]+)(\\s|>)");
>>
>> I'm not sure I grok this pattern; what's up with `\\s`?
>
> The code is looking for HTML tag names, The match for a tag name is one of
> * `<` _tag-name_ `>`
> * `<` _tag-name_ _whitespace_
I see, thanks.
Suggestion:
private final Pattern tag = Pattern.compile("<(?<tag>[A-Za-z0-9]+)(\\s|>)");
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16388#discussion_r1486384478
More information about the build-dev
mailing list