Login  Register

Bold Source Code and Escaping

Posted by rwinch on Aug 19, 2013; 3:44pm
URL: https://discuss.asciidoctor.org/Bold-Source-Code-and-Escaping-tp464.html

I would like to draw attention to a new line of code that has been added to a code snippet by making it bold.  Is there a way to support making source code bold when it contains *? For example, I would like to bold ".antMatcher("/resources/**").permitAll()" within the following code snippet:

NOTE: I do not wish to use a callout in this case because it feels a lot like having an outline with a single section.

.MyCode.java
[source,java]
[subs="verbatim,quotes"]
----
    protected void configure(HttpSecurity http) throws Exception {
        http
            .authorizeRequests()
                .antMatchers("/resources/**").permitAll()
                .anyRequest().authenticated()
                .and()
            .formLogin()
                .loginPage("/login")
                .permitAll();
    }
----

The issue I am struggling with is that I have not found a way to ensure my code renders as code (i.e. use verbatim), allow for having part of the code as bold (i.e. use quote), and escape the * characters (along with other quote markup). Any help would be greatly appreciated.

Cheers,
Rob Winch