Skip to content

Conversation

@MC-Samuel
Copy link
Contributor

  • Converted examples to @example format
  • Replaced instances of empty values with .isEmpty()
  • Converted a few tags to use ternary format
  • Slight meta grammatical fixes

Comment on lines 1440 to 1442
// @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).
// -->
Copy link
Member

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());
Copy link
Member

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();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally asString is preferred.

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

Successfully merging this pull request may close these issues.

2 participants