feat(parse): use nested YAML import: maps instead of one-liner binds
Frontmatter imports are now valid YAML (`import:` / `导入:` with bind→target entries), removing spaced keys. Add `marqdo migrate imports`, hard-error the old one-liner form, and migrate lib/ext/examples/tests/docs accordingly. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
8bbe017a5e
commit
687c168014
364 files changed
+1870
-1004
No files matched your search
+2
-2
@@ -6,14 +6,14 @@ use crate::diagnostics::Span;
|
||||
use crate::formula::Expr as FormulaExpr;
|
||||
use crate::value::CodeBlock;
|
||||
|
||||
/// Frontmatter file import: `import bind:path.mq.md` (see `doc/design/module-namespace.md`).
|
||||
/// Frontmatter file import under nested `import:\n bind: path.mq.md` (see `doc/design/module-namespace.md`).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Import {
|
||||
pub path: String,
|
||||
pub bind: String,
|
||||
}
|
||||
|
||||
/// Frontmatter short-name bind: `import bind:lib.member` (same keyword as file import).
|
||||
/// Frontmatter short-name bind under nested `import:\n bind: lib.member` (same map as file import).
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Use {
|
||||
pub path: Vec<String>,
|
||||
|
||||
Reference in new issue
Block a user