Reputation: 1385
I am currently writing a document describing the project I am working on, using asciidoc plugin for Intellij. Basically, I know that this works :
[source, java]
int i = 0;
Output will be :
int i = 0;
with the grey rectangle, as expected, to specify it's a sample code.
But can you, like StackOverlow does, apply this tag to a single word, without newline needed?
Basically, can you have the grey rectangle on a single word without newline needed, like in the following example :
"This value will be stored in Myobject
" ?
Do not hesitate if it is not clear enough, this question is kind of hard to ask.
Upvotes: 0
Views: 948
Reputation: 10782
Inline code highlighting is possible by enclosing your text / words in single or double backticks:
This value will be stored in `Myobject`.
This value will be stored in ``Myobject``.
Result:
This value will be stored in
Myobject
.
See also the docs: https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/#source-code
Upvotes: 2