我正在尝试使用pygments在Jekyll中突出显示我的nasm语法。它对C和Python完美无缺,但是nasm似乎不起作用。
```nasm
section .text
global _start
_start:
xor ecx, ecx
mov al,15 ; changed push pop to mov
push ecx
push byte 0x77
mov cx,0x4d42 ; random addition before pushing
add cx,0x2222
push cx
push 0x6168732f
push 0x6374652f
mov ebx, esp
push word 0x1b6
pop ecx
int 0x80</p>
mov al,1 ; changed push pop to mov
int 0x80
```
不是将所有内容嵌入到span标记中,而是只生成:
<div class="highlight"><pre><code class="language-nasm" data-lang="nasm"> section .text
global _start
_start:
xor ecx, ecx
mov al,15 ; changed push pop to mov
push ecx
push byte 0x77
mov cx,0x4d42 ; random addition before pushing
add cx,0x2222
push cx
push 0x6168732f
push 0x6374652f
mov ebx, esp
push word 0x1b6
pop ecx
int 0x80</p>
mov al,1 ; changed push pop to mov
int 0x80
</code></pre></div>
这是我的_config.yml:
name: "Cloud101"
description: "Blog"
gems: [jekyll-paginate]
url: "http://cloud101.eu"
paginate: 10
markdown: redcarpet
syntax_highlighter: pygments
redcarpet:
extensions: ["no_intra_emphasis", "fenced_code_blocks", "autolink", "strikethrough", "superscript"]