Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I use Syntax Highlighter by Alex Gorbatchev in my blog on Blogger. It perfectly works with all the programming languages I use. Recently I needed to highlight Windows Command Prompt commands and I found only brush: powershell option for the <pre> tag to do it. Unfortunately, it does not work exactly as I need.

I have theses commands:

taskkill /IM explorer.exe /F
cd /d %userprofile%\AppData\Local
del IconCache.db /a
shutdown /r /f /t 00

When I use <pre class="brush: powershell; gutter: false">CODE_GOES_HERE</pre>, it highlights cd, del and /r (not a command at all) but does not highlight taskkill and shutdown as I expect it to.

Is there any workaround to solve this problem and highlight Windows Command Prompt commands correctly? Or should I use another syntax highlighter in my blog?

Thank you for help.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Here is a list of different brushes that you can add to the script to support several other languages, among which are batch files (bat, cmd, batch):

http://www.undermyhat.org/blog/2009/09/list-of-brushes-syntaxhighligher/

share|improve this answer
    
Thanks! As I understood it is only possible when you host Syntax Highlighter on your own server, right? –  Nikolai Samteladze Oct 22 '12 at 4:28
    
Not necessarily, you can include the brushes code as part of your template and that should do the trick. Of course, it will make your template bigger for every page, even when you don't use it. Check here for some guidance on how to do that: geektalkin.blogspot.com/2009/11/… –  Alpha Oct 22 '12 at 12:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.