Skip to content

Commit

Permalink
TexFormulaParser: Empty groups should be empty RowAtom
Browse files Browse the repository at this point in the history
  • Loading branch information
gsomix committed Feb 25, 2017
1 parent 5a5ac34 commit c4caf53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WpfMath/TexFormulaParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,8 @@ private TexFormula Parse(string value, ref int position, bool allowClosingDelimi
{
var groupValue = ReadGroup(formula, value, ref position, leftGroupChar, rightGroupChar);
var parsedGroup = Parse(groupValue, textStyle);
var groupAtom = new TypedAtom(parsedGroup.RootAtom, TexAtomType.Ordinary, TexAtomType.Ordinary);
var innerGroupAtom = parsedGroup.RootAtom ?? new RowAtom();
var groupAtom = new TypedAtom(innerGroupAtom, TexAtomType.Ordinary, TexAtomType.Ordinary);
formula.Add(AttachScripts(formula, value, ref position, groupAtom));
}
else if (ch == rightGroupChar)
Expand Down

0 comments on commit c4caf53

Please sign in to comment.