diff options
| author | Laurenz <laurmaedje@gmail.com> | 2022-12-05 12:25:37 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2022-12-05 12:25:37 +0100 |
| commit | c2e458a133772a94009733040b39d58e781af977 (patch) | |
| tree | 9404ef8f4982a068f046cb772166fdb8af7c3a0b /library/src/lib.rs | |
| parent | 1d324235bd80fe8d1fb21b1e73ae9e3dfe918078 (diff) | |
Symbol notation
Diffstat (limited to 'library/src/lib.rs')
| -rw-r--r-- | library/src/lib.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs index 3543a672..d549c1cd 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -34,6 +34,7 @@ fn scope() -> Scope { // Text. std.def_node::<text::TextNode>("text"); std.def_node::<text::LinebreakNode>("linebreak"); + std.def_node::<text::SymbolNode>("symbol"); std.def_node::<text::SmartQuoteNode>("smartquote"); std.def_node::<text::StrongNode>("strong"); std.def_node::<text::EmphNode>("emph"); @@ -173,6 +174,7 @@ fn items() -> LangItems { text: |text| text::TextNode(text).pack(), text_id: NodeId::of::<text::TextNode>(), text_str: |content| Some(&content.to::<text::TextNode>()?.0), + symbol: |notation| text::SymbolNode(notation).pack(), smart_quote: |double| text::SmartQuoteNode { double }.pack(), parbreak: || layout::ParbreakNode.pack(), strong: |body| text::StrongNode(body).pack(), |
