Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试在 Emacs 中为 Markdown 创建一个代码块片段。
我试图创建一个像这样的片段:
# -*- mode: snippet -*- # name: code-block # key: cb # --- ```${1:r} ${2:code} ```
但是当我试图保存时,它抛出了一个错误说wrong type argument: stringp, nil。
wrong type argument: stringp, nil
我怎样才能让这个片段工作?
你必须用反斜杠来逃避反引号。
从文档中:
纯文本 可以包含任意文本作为模板的内容。它们通常被解释为纯文本,除了$和`。您需要使用\来逃避它们:\$和\` . 有时\也可能需要对其本身进行转义。\\
可以包含任意文本作为模板的内容。它们通常被解释为纯文本,除了$和`。您需要使用\来逃避它们:\$和\` . 有时\也可能需要对其本身进行转义。\\
$
`
\
\$
\`
\\