I’m trying to output a bit of inline “code” segment1 from a Java comment into an inline code / monospace segment into a Callout Comment (say, with either backticks, the {@code}
segment, or some other way), but I can’t seem to find a way to do so.
1 When I say “inline code segment”, I mean something like this
.
For example, let’s say I have a class called ClassName
defined as follows:
// The `@Generated` annotation is added by the {@code AnnotationProcessor} to
// denote that there are elements of this class that have been generated.
@Generated("pkg.name.AnnotationProcessor")
public class ClassName {
// ...
}
Now, let’s say that I include the Java class into my markdown file, like so:
:include-java: code-snippets/java/output/ClassName.java {
title: "Title",
commentsType: "inline",
wrap: true
}
In this example, I’d like the “@Generated” and “AnnotationProcessor” segments to render as @Generated
and AnnotationProcessor
in the Callout Comment. However, it renders as `@Generated` and `AnnotationProcessor`
Screenshot:
Additionally, if there’s a way to add a Code Reference to each of these segments?