From 7dfa4d8f3eeebfb38b828de13484d33aa495f0da Mon Sep 17 00:00:00 2001 From: trivernis Date: Fri, 21 Aug 2020 21:04:06 +0200 Subject: [PATCH] Fix base of pow and sub being nonencased --- Cargo.toml | 2 +- src/parsing/tree_parser.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2201581..09a3a33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "asciimath-rs" description = "AsciiMath parser" repository = "https://github.com/trivernis/asciimath-rs" -version = "0.5.5" +version = "0.5.6" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/parsing/tree_parser.rs b/src/parsing/tree_parser.rs index ca50d3d..58a1669 100644 --- a/src/parsing/tree_parser.rs +++ b/src/parsing/tree_parser.rs @@ -431,7 +431,7 @@ impl TreeParser { self.step(); self.step(); Some(Pow { - base: previous.to_non_enclosed().boxed(), + base: previous.clone().boxed(), exp: self.parse_element().unwrap().to_non_enclosed().boxed(), }) } else { @@ -445,7 +445,7 @@ impl TreeParser { self.step(); self.step(); Some(Sub { - base: previous.to_non_enclosed().boxed(), + base: previous.clone().boxed(), lower: self.parse_element().unwrap().to_non_enclosed().boxed(), }) } else {