asciimath / asciimathml

A new home for asciimathml
http://asciimath.org/
MIT License
958 stars 184 forks source link

Change number parsing to treat 2. as a number #126

Open drlippman opened 3 years ago

drlippman commented 3 years ago

As identified in issue #124, in the current parsing 2.3, 2 and .2 are treated as numbers, but 2. is treated as a number followed by an period operator. Since trailing decimal places can be used to indicate trailing zeros are significant, this behavior can cause valid numbers to not be treated as such.

However, this also means that if a end-of-sentence period follows a number, and that period is inside the asciimath area for some reason, that period would be treated as part of the number, which may not be desirable. But arguably this case would be caused by semantically incorrect markup, so perhaps isn't something we need to worry about.

drlippman commented 3 years ago

@jipsen, since you understand the parsing grammar much better than me, it'd be great to get your thoughts of whether this would have any unintentional side effects.