Heredoc after comment not highlighted · Issue #422 · vim-ruby/vim-ruby · GitHub
Skip to content

Heredoc after comment not highlighted #422

Description

@biinari

A heredoc following a comment that ends with a full-stop . is not highlighted properly.

    let(:source) do
      # Empty lines should make no difference.
      <<~RUBY
        if #{condition}
          #{body}

        end
      RUBY
    end

vim-ruby_heredoc_after_comment_2020-08-02_00-37-28

Removing the full-stop . at the end of the comment allows the heredoc to be highlighted as expected:

vim-ruby_heredoc_after_comment-no_fullstop_2020-08-02_00-38-26

Unfortunately, I can't think of a way to fix this in a well-performing manner as I think it would require look-behind assertions to check if the preceding dot is part of a comment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions