None code with bold or italic in syntax highlighter

Hi,

Am new to Hugo and blogs so still learning at the moment. I am trying to keep everything as standard as possible in the blogs, so limited html and using shortcodes and minor tweaks to everything that already exists.

I have been using syntax highlighting to display any code which works great. I also have device configurations which I dont use a specific syntax language for and it puts default grey box round them.

I wanted to try and improve this by making things bold and italic, but I guess by design all customization is ignored when using code blocks. For example want it to look like this but be within the syntax box around it.

set interface eth0 comments Outside (n7k1)
set interface eth0 state on
set interface eth0 ipv4-address 192.168.1.4 mask-length 24

Just after any suggestions on how to do this without adding complexity (lots of custom html) into the markdown, or is it not really viable? I did think I could possibly create a custom chroma lexar and style, but not sure if that is the right way to go about this. Would be grateful if anyone could point me in the right direction,

thanks

set interface eth0 comments Outside (n7k1)
set interface eth0 state on
set interface eth0 ipv4-address 192.168.1.4 mask-length 24

You could create a “custom” lexer, but isn’t that format bash, shell, systemd? Adding one of these leads to at least some formats.

You can’t work with markdown fat and italic inside of code brackets, because they are interpreted as pre tags and will be shown. Must be some css in the end.

Thanks for the info. No is for network device configs, have tried some using Chroma playground but nothing is quite right. If a custom lever is the way it should be done will have a dig deeper into that, worst case will have to overcome my OCD and live with it :slight_smile: