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 {