You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #81. Gated on the next aozora pin bump that crosses feat/devex-inner-loop.
Goal
Expose the new aozora nodes as first-class afm IR (decision: full IR
exposure), so the Obsidian/playground consumers can treat them as
structure, not just HTML. Today crates/afm-markdown/src/ir/projection.rs
drops unknown nodes via the _ => wildcard, so new constructs appear in
HTML but not in IrDocument.
New borrowed AozoraNode variants to project (re-confirm at pinned SHA)
From feat/devex-inner-loopcrates/aozora-syntax/src/borrowed/types.rs: AngleQuote (was DoubleRuby), Center, Emphasis, SideNote are new; AozoraHeading and Sashie pre-existed but currently drop from IR. New ContainerKind: Bold, Italic, Center, Columns, Table, LineWidth, WrapIndent, Heading.
Work
crates/afm-markdown/src/ir/projection.rs — replace the relevant _ => None drops with real arms.
Low-risk path for containers: the family
(Columns/Table/LineWidth/WrapIndent/Bold/Italic/Center/ Heading) can be exposed by extending container_subtype()
(projection.rs:205-213) to return new camelCase subtype strings on
the existing IrBlock::Container — no new IR variant needed.
Decide whether LineWidth/Columns should also carry a numeric
param via container_indent_level() (projection.rs:215-224).
Leaf nodes (Center, Emphasis, SideNote, Sashie, AozoraHeading): map to existing IrInline/IrBlock variants where
natural (e.g. Emphasis → IrInline::Strong/Emphasis?, AozoraHeading → IrBlock::Heading?) or add new variants where the
CommonMark mapping would lose information.
Part of #81. Gated on the next aozora pin bump that crosses
feat/devex-inner-loop.Goal
Expose the new aozora nodes as first-class afm IR (decision: full IR
exposure), so the Obsidian/playground consumers can treat them as
structure, not just HTML. Today
crates/afm-markdown/src/ir/projection.rsdrops unknown nodes via the
_ =>wildcard, so new constructs appear inHTML but not in
IrDocument.New borrowed
AozoraNodevariants to project (re-confirm at pinned SHA)From
feat/devex-inner-loopcrates/aozora-syntax/src/borrowed/types.rs:AngleQuote(wasDoubleRuby),Center,Emphasis,SideNoteare new;AozoraHeadingandSashiepre-existed but currently drop from IR. NewContainerKind:Bold,Italic,Center,Columns,Table,LineWidth,WrapIndent,Heading.Work
crates/afm-markdown/src/ir/projection.rs— replace the relevant_ => Nonedrops with real arms.(
Columns/Table/LineWidth/WrapIndent/Bold/Italic/Center/Heading) can be exposed by extendingcontainer_subtype()(projection.rs:205-213) to return new camelCase subtype strings on
the existing
IrBlock::Container— no new IR variant needed.Decide whether
LineWidth/Columnsshould also carry a numericparam via
container_indent_level()(projection.rs:215-224).Center,Emphasis,SideNote,Sashie,AozoraHeading): map to existingIrInline/IrBlockvariants wherenatural (e.g.
Emphasis→IrInline::Strong/Emphasis?,AozoraHeading→IrBlock::Heading?) or add new variants where theCommonMark mapping would lose information.
crates/afm-markdown/src/ir/types.rs— add any newIrInline/IrBlockvariants (camelCase serde tags). Includes theIrInline::DoubleRuby → AngleQuoterename from feat: adapt to aozora DoubleRuby→AngleQuote rename on next pin bump #73 (types.rs:201).crates/xtask/src/types.rs— TS wire strings for the new shapes(xtask:141/286/430 currently carry
doubleRuby).crates/afm-wasm/types/afm_types.d.tsvia xtask (do nothand-edit).
playground/src/editor/{decorations.ts,wrapCommands.ts}—decoration class map + authoring wrap commands for the new constructs.
crates/afm-markdown/examples/ast-walk.rsmatch arms(ast-walk.rs:61 currently names
DoubleRuby).Tests
crates/afm-markdown/tests/{ir_aozora.rs,ir_coverage.rs}— one IR-shapeassertion per new variant/subtype.