SIngle Quote throws error
Closed this issue · 8 comments
‘CFR’ Throws an Error
'CFR' Does Not (look close ' and ’ are different )
The error comes when you cut and paste in text from Word or in this case from a Web App - Simply changing the single quote or apostrophe fixes - in vim just delete it and reenter it - not a big deal but annoying - I assume the same applies for double quotes
Here is a discussion that might help:
I believe this is expected behavior. Common Form accepts only ASCII
characters.
Good point and it does have an error message that say illegal character at such and such a place
But it happened to me twice - from two separate places - Word and wherever I got the CFR cite from
I know that there are an infinite number of incorrect states and an error message for everything would be impossible but this seems like a common error - at least for me - Or maybe it is teaching me not to cut and paste --
What about error message ERROR "Incorrect Quote at ...."
Or make an exception to ASCII for quotes:
@tbrooke: When usability and implementation disagree, usability wins. We should make this work.
@anseljh: I have this ready to go:
https://www.npmjs.com/package/unicode-ascii-equivalents
Any chance you'd like to PR commonform-markup-parse to substitute ASCII for Unicode before handing off to the parser?
Neat. I can try taking a shot at that. Pretty busy right now, so it may not be right away, but I'll get to it eventually! Will open an issue in commonform-markup-parse to remind myself.
It looks like there's a regression here. I just pushed a testing config change to the parser code, and it failed tests, including one on empty forms:
https://travis-ci.org/commonform/commonform-markup-parse/jobs/105566965
I tried again locking the parser generator version, and it passed tests again. Looks like an upstream regression.
I will lock the version and push a patch release to npm shortly. You should npm i -g commonform-cli
again when you can.
Here's green CI for the new patch release:
https://travis-ci.org/commonform/commonform-markup-parse/builds/105571315