mirror of
https://github.com/hneemann/Digital.git
synced 2025-09-15 15:58:41 -04:00
If a symbol command is followed by a blank, this first blank is skipped.
This commit is contained in:
parent
fbb48f49ad
commit
5ad09d5155
@ -136,8 +136,11 @@ public class Parser {
|
||||
java.lang.Character t = COMMANDS.get(command);
|
||||
if (t == null)
|
||||
sentence.add(new Simple('\\' + command));
|
||||
else
|
||||
else {
|
||||
sentence.add(new Character(t));
|
||||
if (peekChar() == ' ')
|
||||
getChar();
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
|
@ -48,8 +48,8 @@ public class ParserTest extends TestCase {
|
||||
|
||||
assertEquals("A=∑b", new Parser("A=\\sum b").parse().toString());
|
||||
assertEquals("A=∑^{m}_{n=0}", new Parser("A=\\sum_{n=0}^m").parse().toString());
|
||||
assertEquals("Y=A⊕B", new Parser("Y=A\\oplus{}B").parse().toString());
|
||||
assertEquals("Y=A⊙B", new Parser("Y=A\\odot{}B").parse().toString());
|
||||
assertEquals("Y=A⊕B", new Parser("Y=A\\oplus B").parse().toString());
|
||||
assertEquals("Y=A⊙B", new Parser("Y=A\\odot B").parse().toString());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user