ASM syntax highlighting on Blogs
gamozolabs opened this issue · 8 comments
Just a heads up that you can do
```nasm
To get x86 assembly (nasm flavor) syntax highlighting on assembly snippits in your blogs :)
Ah I see. It kindof works? But not for many instructions. Works in the Github preview though, lame. Seems to bold common x86 instructions but not many of the SIMD ones.
The preview for markdown like these issues?
mov eax, eax
add eax, 1
pshufb xmm0, xmm0, xmm0
vpshufb xmm0, xmm0, xmm0
mov eax, [rax + 0x100]
foo eax,eaxHuh, yeah.
Yeah... shame it's not as clean as it could be. Sorry for opening the issue. Hopefully the highlighting will get better over time (or maybe I'll look into what a PR takes for w/e does the formatting). I use a lot of asm in my blogs as well, it's nice to have :P
@gamozolabs - no apologies needed, I am happy you mentioned it or I never would have figured it out.
I think the style comes from the CSS embedded in the theme and it can be overridden I guess (blogging is making me learn more about Jekyll and CSS than I really wanted, but maybe it's a good thing?).
This one seems solved, although I'm still looking into how to make the colors less yucky:
The underlying issue is this one in the rouge highlighter: the nasm lexer is very limited and when it barfs (e.g., on any indexed addressing mode), it shows up with that red error highlight. That one is moving slowly, so for now a workaround is just to override the error style in the css to do nothing (I can live with my blog syntax highlighter not flagging my errors) as discussed in #9 .
So I think I can close this one now.
