The (strict) \ce syntax I provided allowed "other" LaTeX commands to be included in \ce only if they were surrounded by $.
Example: <chem>A B C $\cdots$</chem>
However, there are quite a lot of usages out there that include these commands directly into the tag. <chem>A B C \cdots</chem>.
It seems like you allow that, but you parse everything in another mode (for instance, removing whitespace), so that the result will be not as expected. The will render differently in <chem>A B C</chem> and <chem>A B C \cdots</chem>, just because \cdots is present. This is not what a user would expect.
In general, I don't like the idea of two parsing modes. Same input should lead to the same output.
mhchem does support the sloppy syntax (without $), so it could be enabled if you want to include it into your grammar. I guess this will make things a little bit more complicated.
How should we go about this?