Skip to content

feat: adapt to aozora DoubleRuby→AngleQuote rename on next pin bump #73

@P4suta

Description

@P4suta

Background

aozora renamed its DoubleRuby node to AngleQuote and corrected the 二重山括弧 model: the input encoding is ≪…≫ (U+226A/U+226B) and the display form is 《…》 (U+300A/U+300B). (The old code recognised 《《…》》 as input and rendered ≪≫ — exactly backwards.) This is a breaking upstream change.

  • aozora ADR-0011 docs/adr/0011-double-angle-quotation-input-encoding.md
  • aozora commit 84fea47feat(notation)!: 二重山括弧 — ≪≫ input → 《》 display (DoubleRuby→AngleQuote)

afm pins aozora at rev df0f64b1a42897030d4b7d0129fb7564e070ab73 (Cargo.toml), which is before the rename, so afm is not broken right now. This tracks the follow-up needed when afm next bumps the aozora pin.

Must change (compile-breaking on pin bump)

  • crates/afm-markdown/src/ir/projection.rs:27use aozora::…::DoubleRuby as AozoraDoubleRubyAngleQuote as AozoraAngleQuote
  • crates/afm-markdown/src/ir/projection.rs:39AozoraNode::DoubleRuby(d) => …AozoraNode::AngleQuote(d)
  • crates/afm-markdown/src/ir/projection.rs:79fn project_double_ruby(d: &AozoraDoubleRuby<'_>) argument type
  • crates/afm-markdown/examples/ast-walk.rs:61AozoraNode::DoubleRuby(_) => "DoubleRuby"

Decide: keep or rename afm's own IR variant

afm has its own IrInline::DoubleRuby (crates/afm-markdown/src/ir/types.rs:201) + project_double_ruby. These are afm-internal and need not change, but renaming to AngleQuote is more consistent. If renamed, also update the wire string doubleRuby:

  • crates/xtask/src/types.rs:141, 286, 430
  • generated crates/afm-wasm/types/afm_types.d.ts:38 (regenerate; do not hand-edit)

Behaviour/output changes (tests + playground)

The construct's HTML flips — display ≪X≫《X》, CSS class aozora-double-rubyaozora-angle-quote; the source input form 《《X》》≪X≫.

  • crates/afm-markdown/tests/html_well_formed.rs:102 (input + class assertion)
  • crates/afm-markdown/tests/ir_aozora.rs:76-90 (double_ruby_projects_base)
  • playground/src/editor/decorations.ts:41doubleRuby: 'cm-aozora-double-ruby'angleQuote: 'cm-aozora-angle-quote'
  • playground/src/editor/wrapCommands.ts:22, 69 — id afm.wrap.doubleRuby, template |BASE《《${0}》》 → the new input form ≪${0}≫
  • doc mentions: CHANGELOG.md, crates/afm-markdown/src/ir/mod.rs:16, src/lib.rs:304, src/ast_splice.rs:281, crates/afm-book/src/library.md

Reference

The aozora aozora-conformance angle_quote vector pins ≪重要≫ → <span class="aozora-angle-quote">《重要》</span>. A stray 《《…》》 in source is now two ruby openers (a nested-ruby diagnostic), not this construct.

Metadata

Metadata

Assignees

No one assigned

    Labels

    dependenciesPull requests that update a dependency fileenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions