Module: Markdown::Merge::NodeTypeNormalizer
- Extended by:
- Ast::Merge::NodeTyping::Normalizer
- Defined in:
- lib/markdown/merge/node_type_normalizer.rb
Overview
Normalizes backend-specific node types to canonical markdown types.
Uses Ast::Merge::NodeTyping::Wrapper to wrap nodes with canonical merge_type, allowing portable merge rules across backends.
## Thread Safety
All backend registration and lookup operations are thread-safe via the shared Ast::Merge::NodeTyping::Normalizer module.
## Extensibility
New backends can be registered at runtime:
## Canonical Types
The following canonical types are used for portable merge rules:
-
:heading- Headers/headings (H1-H6) -
:paragraph- Text paragraphs -
:code_block- Fenced or indented code blocks -
:list- Ordered or unordered lists -
:block_quote- Block quotations -
:thematic_break- Horizontal rules -
:html_block- Raw HTML blocks -
:table- Tables (GFM extension) -
:footnote_definition- Footnote definitions -
:custom_block- Custom/extension blocks