diff --git a/Cargo.toml b/Cargo.toml index 48df156..1e6ab6b 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.4.0" +version = "0.4.1" authors = ["trivernis "] edition = "2018" readme = "README.md" diff --git a/src/lib.rs b/src/lib.rs index bd139de..eb46618 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -352,7 +352,7 @@ mod tests { //#[test] fn it_writes_mathml() { let str_expression = - "sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2)) [[2, 3 + 3],[4, 5]]"; + "alpha sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2))[[2, 3 + 3],[4, 5]] + alpha"; let expression = parse(str_expression.to_string()); fs::write( "test-files/test.html", @@ -368,7 +368,7 @@ mod tests { #[bench] fn bench_tokenizer(b: &mut Bencher) { - let expression = "sum_(iiiiiiiii=1)^n i^3=((n(n+1))/2)^2"; + let expression = "sqrt 1 in NN implies 2^4 + sum_(k = 1)^3 - ((1),(2)) [[2, 3 + 3],[4, 5]] (((((((nesting)))))))"; b.iter(|| parse(expression.to_string())); } } diff --git a/src/parsing/tree_parser.rs b/src/parsing/tree_parser.rs index f847749..4470660 100644 --- a/src/parsing/tree_parser.rs +++ b/src/parsing/tree_parser.rs @@ -267,7 +267,6 @@ impl TreeParser { self.step(); self.step(); expressions.push(self.parse_expression()); - self.step(); if let Token::Grouping(Grouping::LBracket) = self.current_token() { self.step();