Skip to content

Conversation

@bgisme
Copy link
Contributor

@bgisme bgisme commented Feb 20, 2022

Prevent

Prevent <tag style=""></tag>
/// Specifies an inline CSS style for an element
func style(_ value: String) -> Self {
guard !value.isEmpty else { return self }
attribute("style", value)
Copy link
Member

Choose a reason for hiding this comment

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

You also have to add return before the attribute call in this case. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry. Finally cloned the GitHub so I can make changes in Xcode with a compiler.

At least I remembered the .isEmpty this time!!!

@tib
Copy link
Member

tib commented Feb 20, 2022

Could you also write just a short test case to validate if it works or not? Thanks. :)

@tib tib merged commit 2ce3194 into BinaryBirds:main Feb 21, 2022
@bgisme bgisme deleted the patch-13 branch March 18, 2022 13:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants