Skip to content

Commit

Permalink
fix true/ false html attributes with dash, like "data-test"
Browse files Browse the repository at this point in the history
  • Loading branch information
bastjan committed Nov 26, 2013
1 parent 6cdeb3f commit e81e1e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/haml-coffee.coffee
Expand Up @@ -626,9 +626,9 @@ module.exports = class HamlCoffee
convertBooleans: (code) ->
if code.indexOf('$c') isnt -1
if @options.format is 'xhtml'
'.replace(/\\s(\\w+)=\'\u0093true\'/mg, " $1=\'$1\'").replace(/\\s(\\w+)=\'\u0093false\'/mg, \'\')'
'.replace(/\\s([\\w-]+)=\'\u0093true\'/mg, " $1=\'$1\'").replace(/\\s([\\w-]+)=\'\u0093false\'/mg, \'\')'
else
'.replace(/\\s(\\w+)=\'\u0093true\'/mg, \' $1\').replace(/\\s(\\w+)=\'\u0093false\'/mg, \'\')'
'.replace(/\\s([\\w-]+)=\'\u0093true\'/mg, \' $1\').replace(/\\s([\\w-]+)=\'\u0093false\'/mg, \'\')'
else
''

Expand Down

0 comments on commit e81e1e2

Please sign in to comment.