Sourcecode markup tweaks in Wordpress
I noticed in Ed Stevens’ blog posting here that some sourcecode he’d posted had certain lines highlighted.
Wordpress provides the sourcecode tag for marking up sourcecode in blog posts. For example:
cd /some/random/folder ls -l # do not run this next line!
is much better presented as: [sourcecode language=“bash”] cd /some/random/folder ls -l # do not run this next line! [/sourcecode] by wrapping it in [sourcecode] tags
I’ve known about the language=‘xx’ attribute that you can use with the tag, but Ed’s posting prompted me to check on the syntax and it turns out there a few tweaks one can use.