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

Attribute with no value is being stripped from output #82

Open
mattymess opened this issue Jul 12, 2014 · 4 comments
Open

Attribute with no value is being stripped from output #82

mattymess opened this issue Jul 12, 2014 · 4 comments

Comments

@mattymess
Copy link

To preface this issue, it's an AngularJS template, which is why I have the attribute with no value.

Given the following HAML...

.col-sm-4.center-block
  %div(ui-view)

...or given this...

.col-sm-4.center-block
  %div{"ui-view" => ""}

...outputs...

<div class=\"col-sm-4 center-block\"><div></div></div>

I want the output to be:

<div class=\"col-sm-4 center-block\"><div ui-view></div></div>

Is this a bug or am I missing some option that I need to pass when I render?

@sirganya
Copy link

I had to add a placeholder to my directive and remove it after compilation using gulp.

https://www.npmjs.com/package/gulp-replace-task

@stugol
Copy link

stugol commented Sep 13, 2016

It's been over 2 years, and this is STILL not fixed? Is the project totally dead?

@jtomaszewski
Copy link

Duplicate of #63 , one of these issues should be closed.

This is fixed in deskfed@e5e12e8 . We could write some tests for it though.

If you want to use it, can use deskfed's 0.4.4 branch or mine master .

@seballot
Copy link

Also, in case you need attributes without any value at whole (for exemple in Vue.js <div v-else>), I made a fix, here is the repo : https://github.com/seballot/haml-js

your can add it to your project with npm install seballot/haml-js#master

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

5 participants