fix(lex): treat leading backtick decl lines as narrative

Only `` `name` = … `` binds stay Code; lines like `` `捕获=True` 时… `` are Comment Decl prose so they no longer raise unrecognized statement.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
cflmyandCursor committed 2026-09-14 14:22:19 +08:00
1 parent 4f09e515ee
commit 8846f5f070
4 files changed
+51 -2

No files matched your search

+5
View File
@@ -3872,3 +3872,8 @@ fn markup_v03_float_discount() {
fn markup_v03_dynamic_footnote() {
assert_out_v03("tests/markup-v03/dynamic-footnote.mq.md", "28");
}
#[test]
fn markup_v03_leading_backtick_decl() {
assert_out_v03("tests/markup-v03/leading-backtick-decl.mq.md", "ok");
}
@@ -0,0 +1,12 @@
---
title: leading backtick decl is narrative
description: `` `名`… `` / `` `捕获=True` 时… `` are Decl prose, not statements
---
# main
`捕获=True` 时返回映射 `{code, stdout, stderr}`。
向`谁`问好。
> print text=ok