Code Gem

Code Gem

Knowledge was arriving in dribs and drabs

Code Gem RSS Feed
 
 
 
 

Improved SyntaxHighlighter A Little For This Blog

I am using SyntaxHighlighter to make my code snippet looks pretty in this blog. It a very cool code highlight engine: 100% JavaScript based, no server side code needed, can deal with various languages, and have very nice features like collapse code by default to make the post looks clean for the first glance.

But it bothers be as the latest version of SyntaxHighlighter lack something I want:

  • Code highlight for assembly language.
  • Collapse code again after expand it.

So today I took sometime to go over the JavaScript code and tweak it somehow to support my needs. As you can see in other posts, now assembly codes are highlighted correctly, and collapse/expand swith is supported:

PUBLIC  ??_7ClassHasVTable@@6B@             ; ClassHasVTable::`vftable'   

;   COMDAT ??_7ClassHasVTable@@6B@
CONST   SEGMENT
??_7ClassHasVTable@@6B@ DD FLAT:?foo@ClassHasVTable@@UAEXXZ ; ClassHasVTable::`vftable'
CONST   ENDS   

??0ClassHasVTable@@QAE@XZ PROC              ; ClassHasVTable::ClassHasVTable, COMDAT
; _this$ = ecx
    push    ebp
    mov ebp, esp
    push    ecx
    mov DWORD PTR _this$[ebp], ecx
    mov eax, DWORD PTR _this$[ebp]
    mov DWORD PTR [eax], OFFSET ??_7ClassHasVTable@@6B@
    mov eax, DWORD PTR _this$[ebp]
    mov esp, ebp
    pop ebp
    ret 0
??0ClassHasVTable@@QAE@XZ ENDP              ; ClassHasVTable::ClassHasVTable  

Enjoy!

Share/Save/Bookmark

2 Responses to “Improved SyntaxHighlighter A Little For This Blog”

  1. 1
    Alexwebmaster:

    Hello webmaster
    I would like to share with you a link to your site
    write me here preonrelt@mail.ru

  2. 2
    reicuoume:

    Quels mots… super, l’id?©e magnifique cialis 5mg http://runfr.com cialis rapide france effet cialis 20mg prix du cialis en belgique

Leave a Reply

March 2010
M T W T F S S
« Feb «-»  
1234567
891011121314
15161718192021
22232425262728
293031  

Blogroll