Skip to content

[Feature] Add support for Ruby 2.3's "squiggly heredoc" #3

@Epigene

Description

@Epigene

Hi!

This package does not seem to recognize squiggly heredoc style code as string.
More on those in Multiline strings in Ruby 2.3 - the squiggly heredoc.

Here's an example:

# old heredoc style, works
message = <<-HEREDOC
  Subscription expiring soon!
  Your free trial will expire in #{days_until_expiration} days.
  Please update your billing information.
HEREDOC

# squiggly, is not recognized as string
message = <<~HEREDOC
  Subscription expiring soon!
  Your free trial will expire in #{days_until_expiration} days.
  Please update your billing information.
HEREDOC

I suspect this is a simple regex update to match not only a "<<-", but also "<<~".

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions