dxinteractive / xenpaper

Repo for xenpaper.com

Home Page:https://xenpaper.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`m` in comment sometimes causes parsing error

bgins opened this issue Β· comments

Hello πŸ‘‹.

I noticed that in some cases the character m in a comment triggers a parsing error. For example:

# Ptolemy's Diatonic Scales
{1/1 21/20 7/6 4/3 3/2 63/40 7/4}
0 1 2 3 4 5 6 7-

# Ptolemy's Tense Diatonic
{1/1 16/15 6/5 4/3 3/2 8/5 9/5}
0 1 2 3 4 5 6 7-

In this case, if the m is removed from the second instance of Ptolemy's, parsing succeeds.

This is an excellent app, and I have been enjoying it quite a lot. Thank you for making it! ❀️

Oh how bizarre! I'll definitely need to fix this.

Think I found it, looks like there's a missing ^ at the start of the regex that matches the m in the scale group prefixes liek {m0 1}. https://github.com/dxinteractive/xenpaper/blob/main/packages/xenpaper-ui/src/data/grammar.ts#L341

I'll try get a small release through soon with the fix.

Awesome thanks! πŸ™

Hi @bgins , I believe this is fixed now as of https://github.com/dxinteractive/xenpaper/releases/tag/1.4.1. Sorry it took so long!

Hey, just tried it out, and it's working great! Here's a paper with a set of ancient Greek enharmonic tunings. Extensive use of m in the comments throughout.

Thanks again for the great work on this app!