diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-03-08 13:02:41 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-03-08 14:35:33 +0100 |
| commit | d7a65fa26d131179d9d82226e5ee1b562084e48a (patch) | |
| tree | c21ab20e9fb851e14e1ebea3e14fc351b1fdbcc9 /library/src/lib.rs | |
| parent | e5eab73374880077971f3f22acbdd3d302877128 (diff) | |
Rework style chain access
Diffstat (limited to 'library/src/lib.rs')
| -rw-r--r-- | library/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/library/src/lib.rs b/library/src/lib.rs index e0994f25..fcd0bf45 100644 --- a/library/src/lib.rs +++ b/library/src/lib.rs @@ -164,8 +164,8 @@ fn styles() -> StyleMap { fn items() -> LangItems { LangItems { layout: |world, content, styles| content.layout_root(world, styles), - em: |styles| styles.get(text::TextNode::SIZE), - dir: |styles| styles.get(text::TextNode::DIR), + em: text::TextNode::size_in, + dir: text::TextNode::dir_in, space: || text::SpaceNode::new().pack(), linebreak: || text::LinebreakNode::new().pack(), text: |text| text::TextNode::new(text).pack(), @@ -178,7 +178,7 @@ fn items() -> LangItems { raw: |text, lang, block| { let content = text::RawNode::new(text).with_block(block).pack(); match lang { - Some(_) => content.styled(text::RawNode::LANG, lang), + Some(_) => content.styled(text::RawNode::set_lang(lang)), None => content, } }, |
