diff options
| author | Laurenz <laurmaedje@gmail.com> | 2023-01-27 11:54:30 +0100 |
|---|---|---|
| committer | Laurenz <laurmaedje@gmail.com> | 2023-01-27 11:54:30 +0100 |
| commit | a8fd64f9289b92614b9e6c16e909ec0c45429027 (patch) | |
| tree | 76ce8797a6fe9c8b8c0bb1783910ba4b9e22da8b /library/src/math | |
| parent | 33585d9a3fbab8a76d3fd8e9c2560f929202a518 (diff) | |
Hashtags everywhere!
Diffstat (limited to 'library/src/math')
| -rw-r--r-- | library/src/math/accent.rs | 4 | ||||
| -rw-r--r-- | library/src/math/root.rs | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/library/src/math/accent.rs b/library/src/math/accent.rs index a15a6020..6829554c 100644 --- a/library/src/math/accent.rs +++ b/library/src/math/accent.rs @@ -133,7 +133,7 @@ fn attachment(ctx: &MathContext, id: GlyphId, italics_correction: Abs) -> Abs { /// Extract a single character from content. fn extract(accent: &Content) -> Option<char> { - let atom = accent.to::<FormulaNode>()?.body.to::<AtomNode>()?; + let atom = accent.to::<AtomNode>()?; let mut chars = atom.0.chars(); let c = chars.next().filter(|_| chars.next().is_none())?; Some(combining(c)) @@ -166,6 +166,8 @@ fn combining(c: char) -> char { '\u{2190}' => '\u{20d6}', '\u{2192}' => '\u{20d7}', '\u{2212}' => '\u{0305}', + '\u{223C}' => '\u{0303}', + '\u{22C5}' => '\u{0307}', '\u{27f6}' => '\u{20d7}', _ => c, } diff --git a/library/src/math/root.rs b/library/src/math/root.rs index 10573066..bae3bbb6 100644 --- a/library/src/math/root.rs +++ b/library/src/math/root.rs @@ -155,7 +155,7 @@ fn layout( /// Select a precomposed radical, if the font has it. fn precomposed(ctx: &MathContext, index: Option<&Content>, target: Abs) -> Option<Frame> { - let node = index?.to::<FormulaNode>()?.body.to::<AtomNode>()?; + let node = index?.to::<AtomNode>()?; let c = match node.0.as_str() { "3" => '∛', "4" => '∜', |
