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

Option to add boolean attributes #99

Closed
shmargum opened this issue Feb 7, 2017 · 1 comment
Closed

Option to add boolean attributes #99

shmargum opened this issue Feb 7, 2017 · 1 comment

Comments

@shmargum
Copy link
Contributor

shmargum commented Feb 7, 2017

I would like to add some boolean attributes. They are not standard, but i would like to specify them as an option in the config.

For example, to render a valid version of my page on Google AMP, I need to include several custom boolean attributes, and the page does not validate if they are not exactly as described. These attributes include amp and other amp specific attributes.

@k0kubun
Copy link
Owner

k0kubun commented Feb 7, 2017

For some performance reasons, I don't want to add an option for that. Haml is slow because the number of options required on runtime is large. The option must make performance worse unless the option is a singleton.

In addition, I don't want to add method calls on runtime. So we should modify the single constant directly. This is the plugin for you. https://github.com/hamlit/hamlit-boolean_attributes

@k0kubun k0kubun closed this as completed Feb 7, 2017
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

No branches or pull requests

2 participants