8287118: Use monospace font for annotation default values

Reviewed-by: hannesw, jjg
This commit is contained in:
liach 2022-06-01 23:05:51 +00:00 committed by Jonathan Gibbons
parent 72bcf2aa03
commit 6030c0e403
3 changed files with 3 additions and 3 deletions

View File

@ -270,7 +270,7 @@ public class AnnotationTypeMemberWriterImpl extends AbstractMemberWriter
if (value != null) {
var dl = HtmlTree.DL(HtmlStyle.notes);
dl.add(HtmlTree.DT(contents.default_));
dl.add(HtmlTree.DD(Text.of(value.toString())));
dl.add(HtmlTree.DD(HtmlTree.CODE(Text.of(value.toString()))));
annotationContent.add(dl);
}
}

View File

@ -141,7 +141,7 @@ public class TestAnnotationTypes extends JavadocTester {
<div class="member-signature"><span class="return-type">java.lang.String</span>&nbsp;<span class="element-name">optional</span></div>
<dl class="notes">
<dt>Default:</dt>
<dd>""</dd>
<dd><code>""</code></dd>
</dl>
</section>
</li>

View File

@ -113,7 +113,7 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"""
<dl class="notes">
<dt>Default:</dt>
<dd>true</dd>
<dd><code>true</code></dd>
</dl>""");
// Test for valid HTML generation which should not comprise of empty