haml / html2haml

Convert HTML and HTML+Erb to Haml.
MIT License
259 stars 55 forks source link

Parse Ruby code with currently running version of Ruby syntax parser #90

Closed amatsuda closed 2 years ago

amatsuda commented 2 years ago

Currently, html2haml internally uses RubyParser.new to parse interpolated Ruby code. For instance, it uses Ruby 3.1 syntax parser as of today, regardless of the actual Ruby version of the user's current project.

Instead, it'd be natural to use the parser for currently running Ruby version.