https://discuss.asciidoctor.org/Bold-Source-Code-and-Escaping-tp464p469.html
Rob,
As you have cited, custom substitutions are supported on the source block (and any block, for that matter):
[source,java]
[subs="verbatim,quotes"]
----
System.out.println("Hello *bold* text").
----
If you want to enable the quotes in an ad-hoc way, then you'll want to enable macros on the block and use the inline pass:[] macro, which allows substitutions to be specified:
[source,java]
[subs="verbatim,macros"]
----
System.out.println("No *bold* here");
pass:verbatim,quotes[System.out.println("Hello *bold* text");]
----
Unfortunately, this introduces additional markup into the Java source that makes it invalid in raw form...though the output it produces will be valid. So, hopefully it gets you by today.
An idea that stems from this is to allow the substitutions to be enabled on a given line from outside the source code. That's probably best handled in a BlockProcessor (coming in 0.1.4) or a BlockFilter (planned for the subsequent release).
Let me know if that works for you, or if you need more info.
Cheers,
-Dan