grego/blades

ignore Escape Character in <code> and <pre>

tlogin2021 opened this issue · 3 comments

error when content contains \. :

TOML error: invalid escape character in string: `.` at line 7 column 2

in zola, `12\n\n3` is 12\n\n3, but blades: `12\n\n3` is

`12

3`

grego commented

Could you, please, show the whole file where this happens?

Could you, please, show the whole file where this happens?

2022-06-22-test-01.toml:

title = "test-01"
slug = "test-01"
date = 2022-06-22

content = """
Put your *possibly markdowned* content here.
`location ~ .*\.php(\/.*)*$ {include fastcgi.conf; fastcgi_pass 127.0.0.1:9000;}`
"""

error:

PS C:\Users\home\Desktop\新建文件夹> blades
Error parsing content\2022-06-13-test-01: TOML error: invalid escape character in string: `.` at line 7 column 16
grego commented

Since you use a TOML file, you need to escape the backslash (\\).

Alternatively, you could use a markdown file with a TOML header.

2022-06-22-test-01.md:

+++
title = "test-01"
slug = "test-01"
date = 2022-06-22
+++
Put your *possibly markdowned* content here.
`location ~ .*\.php(\/.*)*$ {include fastcgi.conf; fastcgi_pass 127.0.0.1:9000;}`