Skip to content

Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

Prism::Translation::Ripper#visit_heredoc_node_whitespace

visit_heredoc_node_whitespace(parts)

Ripper gives back the escaped string content but strips out the common leading whitespace. Prism gives back the unescaped string content and a location for the escaped string content. Unfortunately these don’t work well together, so here we need to re-derive the common leading whitespace.