Skip to content

ElementTag Updates - #119

Open
MC-Samuel wants to merge 3 commits into
DenizenScript:masterfrom
MC-Samuel:elementtag
Open

ElementTag Updates#119
MC-Samuel wants to merge 3 commits into
DenizenScript:masterfrom
MC-Samuel:elementtag

Conversation

@MC-Samuel

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

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
Copy Markdown
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
Copy Markdown
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