Open mdiasdev opened 6 years ago
Thanks for raising this issue. This relates to the identifier
parser in ConstraintsParser+Instances.swift
:
Currently it does not allow single-quote marks, which stops it from greedily consuming the whole line as an identifier. It will be a challenge to address this issue within the current limitations of the parsing framework, especially to avoid unrelated errors being reported as bad identifiers (since the framework reports the error furthest along the input stream).
I'll mark this as an enhancement, and give it some thought. Thanks again.
Thanks @johnpatrickmorgan, that sounds great! Is it possible to detect that there's an odd number of apostrophes and update the error message to reflect that as a short-term fix? Admittedly I have not looked through the source code -- so I don't know if it's possible -- just trying to offer some potential help for other developers scratching their heads as I was yesterday
Thanks, yes that seems like a good short-term approach. As an aside, I think U+2019 is the preferred character for possessive apostrophes, which would avoid the issue in this case at least.
If a UILabel has text that contains an apostrophe the parser fails with:
Example:
if you change
friend's
tofriends
the parser is again able to handle the input