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!
March 3rd, 2009 at 12:43 pm
Hello webmaster
I would like to share with you a link to your site
write me here preonrelt@mail.ru
February 7th, 2010 at 12:57 am
Quels mots… super, l’id?©e magnifique cialis 5mg http://runfr.com cialis rapide france effet cialis 20mg prix du cialis en belgique