Is there a good HAML & # 8594; ERB / ​​HTML?

Am I looking for a reliable way to convert a HAML template to an equivalent ERB / ​​HTML template?

Has anyone come across this?

+60
ruby-on-rails converter haml
Jun 08 '09 at 22:08
source share
6 answers

I recommend you use the HAML2ERB service. It is really cool and generates valid ERB / ​​HTML code! Benefits:

  • HTTPS - if you need protection for your markup;
  • API - you can write a plugin or something else for your IDE;
  • Simple - just put your HAML code in the text box and click "Convert";
  • The project is active - the author is currently working on it.

The project was tested on a large HAML view (over 800 lines of markup) from a real production application, and it worked fine for me.

Good luck

+27
Aug 23 '13 at 8:17
source share

try W2tags, you can even test it in: w2tags.heroku.com

+13
Nov 27 '09 at 19:38
source share

I just wrote a HAML translator for ERB in Haskell. https://github.com/danchoi/herbalizer

If you are still trying to find a tool for this problem, let me know if this works well or not.

+5
Apr 6 '13 at
source share

There seem to be some tricky problems translating HAML to ERB, as HAML supports some subtleties that are not easy to translate back to ERB without parsing Ruby code. A naive implementation using the HAML engine is here:

HAML for HTML demo

+4
Jun 08 '09 at 22:28
source share

There is our branch haml2erb that does not support the entire HAML syntax, but it is good enough for us to write Rhomobile views in HAML.

0
Aug 15 2018-12-12T00:
source share

Haml2Erb is a very amazing online converter. It really helps me a lot.

0
Mar 06 '14 at 6:07
source share



All Articles