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

Haml 2 slim now works with ruby 1.9 syntax #27

Closed
wants to merge 6 commits into from

Conversation

brand-it
Copy link

Found it was a lot of work to change HAML to Slim if you have ruby 1.9
syntax. This can make things difficult to use this tool.

@brand-it
Copy link
Author

#23 did not notice this pull request. Total should of checked first lol

Found it was a lot of work to change HAML to Slim if you have ruby 1.9
syntax. This can make things difficult to use this tool.

Was replacing the style: attributes string incorrectly

Style attribute would replace some times when it matches. Example below

style: "margin: 10px;" => style=":margin => 10px;"

Make sure that there is no space between the key and colon
@@ -22,4 +22,6 @@ Gem::Specification.new do |s|
s.add_dependency "ruby_parser"
s.add_development_dependency 'rake'
s.add_development_dependency "slim", [">= 1.0.0"]
s.add_development_dependency 'minitest', '~> 5.8.3'
s.add_development_dependency 'pry'
Copy link

Choose a reason for hiding this comment

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

you added this as a development dependency, but it appears required at runtime as well.

Copy link
Author

Choose a reason for hiding this comment

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

removed the require pryfrom the converter.rb must of left it in after testing out the tool.

@brand-it
Copy link
Author

brand-it commented Aug 9, 2016

This gem still has a bug with things like data: { something: 'test' }. Depending on the way the haml is formated it replaces a bit funny.

@brand-it brand-it closed this Jan 8, 2021
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.

2 participants