-
-
Notifications
You must be signed in to change notification settings - Fork 35
ElementTag Updates #119
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
base: master
Are you sure you want to change the base?
ElementTag Updates #119
Conversation
| // @description | ||
| // Returns The Value Of An ElementTag In Title Case (The First Letter Of Each Word Is Capitalized, Based On Spaces). | ||
| // Returns The Value Of An ElementTag In Title Case (The First Letter Of Each Word Is Uppercase, Based On Spaces). | ||
| // --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Capitalized is better here imo, if you want to you can add a @synonyms.
| return new ElementTag(""); | ||
| } | ||
| return new ElementTag(Character.toUpperCase(object.element.charAt(0)) + object.element.substring(1).toLowerCase()); | ||
| return new ElementTag(object.element.isEmpty() ? "" : Character.toUpperCase(object.element.charAt(0)) + object.element.substring(1).toLowerCase()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I see the benefit in these sorts of changes? For simpler lines sure but this is already pretty cluttered to look at - there's nothing wrong with separating an early return (and also more consistent with the rest of the tags here).
| return null; | ||
| } | ||
| String regex = attribute.getParam(); | ||
| String regex = param.toString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally asString is preferred.
@exampleformat.isEmpty()