Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect parsing for named views #1

Closed
revolter opened this issue Aug 28, 2017 · 5 comments
Closed

Incorrect parsing for named views #1

revolter opened this issue Aug 28, 2017 · 5 comments

Comments

@revolter
Copy link

I set the accessibilityIdentifier for a UIView and the constraint error looks like this (trimmed):

(
    "<NSLayoutConstraint:0x17468b860 progress background.height == 5   (active, names: progress background:0x1089a5290 )>"
)

and it crashed with:

UNEXPECTED INPUT:
Line 2, Column 46
    "<NSLayoutConstraint:0x17468b860 progress background.height == 5   (active, names: progress background:0x1089a5290 )>"
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
EXPECTED:
':'
'.'
@johnpatrickmorgan
Copy link
Owner

Thanks for raising an issue. I should be able to add space as a valid character for identifiers, which will fix this.
partialInstanceName:
https://github.com/johnpatrickmorgan/wtfautolayout/blob/master/Sources/App/Parsing/ConstraintsParser%2BInstances.swift

@revolter
Copy link
Author

Are the parentheses at the end supported? I'm asking because the example doesn't have any.

@johnpatrickmorgan
Copy link
Owner

Yes, you should find removing the space in the identifier it will work for now (until I make the fix):

(
    "<NSLayoutConstraint:0x17468b860 progressbackground.height == 5   (active, names: progressbackground:0x1089a5290 )>"
)

@revolter
Copy link
Author

Also, first! 😂

johnpatrickmorgan added a commit that referenced this issue Aug 29, 2017
* develop:
  Renames proseDescription to htmlDescription
  Adds code style, retags about bumf as a div
  Adds code markup to footnote text
  Uppercases the identifying initial and ensures it is alphanumeric
  Adds support for accessibility identifiers that include space characters (#1)
  Prevents description duplicating "minus and minus sign
@johnpatrickmorgan
Copy link
Owner

@revolter Thanks again, this fix has now been deployed. Example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants