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

[WIP] Bolean attributes serialization #53

Merged
merged 4 commits into from
Jul 22, 2014
Merged

[WIP] Bolean attributes serialization #53

merged 4 commits into from
Jul 22, 2014

Conversation

goetas
Copy link
Member

@goetas goetas commented Jun 17, 2014

Added a way to decide what attributes are boolean

@goetas goetas changed the title Bolean attributes serialization [WIP] Bolean attributes serialization Jun 17, 2014
@goetas
Copy link
Member Author

goetas commented Jun 27, 2014

@mattfarina @technosophos is this too heavy patch? used to solve a very little problem...

Moreover it will require some configurations (by the end user) to support non-html5 tags..

<html ng-app>
 ...
</html>

Angularjs example..

serach for non-boolean attrs.

Is a more compatible approach, with its own drawbacks.
@goetas
Copy link
Member Author

goetas commented Jun 30, 2014

Now, unknown empty attributes are considered booleans

<html ng-app>
 ...
</html>

'attrName'=>array('alt', 'title'),
),

);
Copy link
Member

Choose a reason for hiding this comment

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

This refers to xhtml. How are you handling html5 bool attributes that are different? For example, autoplay on <video>.

Copy link
Member Author

Choose a reason for hiding this comment

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

Here I'm saying which are the attributes that are not boolean. So, any empty attribute by-default is boolean.

With this configuration you can just avoid to have this <img src="xxxx" alt>, which is not correct.

If the autoplay attribute is set to (empty value) it will be outputed as<video autoplay>
otherwise will be<video autoplay="something">

@goetas goetas merged commit 10e596d into Masterminds:master Jul 22, 2014
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.

None yet

2 participants