0

我正在尝试使用 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&lt;/p&gt;
       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"]
4

0 回答 0