ReTeX / ReX

ReX - typesetting mathematics
122 stars 8 forks source link

Accents should not place simple symbols in a `ParseNode::Group` #4

Closed cbreeden closed 6 years ago

cbreeden commented 7 years ago

Currently, \hat{A} will place A in a ParseNode::Group, and \hat A will simply place a ParseNode::Symbol in the nucleus of the ParseNode::Accent.

As a macro argument, the opening and closing braces should be transparent to the processing of ParseNode::Accent. In particular, this will give false positives to nucleus.is_symbol when processing superscripts.

It may be worth considering changing the nucleus field of an Accent to a Vec<ParseNode> instead.

cbreeden commented 6 years ago

Changing from Box<ParseNode> to Vec<ParseNode> did the trick reference: 39c121626e47f331c6fe5813ead5d3eb97bd898b