1. Georg Brandl
  2. pygments-main
  3. Issues
Issue #422 resolved

Perl single-quoted here-doc not triggering here-doc token(?)

Anonymous created an issue

The Perl code:

{{{ print <<'EOF' Some stuff EOF }}}

is not formatted correctly. It should be formatted like a heredoc, but without variable interpolation. The official Perl documentation includes [http://perldoc.perl.org/perlop.html#%253c%253cEOF a section on here-docs]. The "Single Quotes" section is particularly relevant.

Attached is a short test file that currently fails to format correctly.

Reported by encryptio

Comments (3)

  1. Anonymous

    I didn't think that it would be quite so simple to fix.

    Diff attached that fixes the problem, and as far as I can tell doesn't cause any new ones. Take it with a grain of salt, as I don't have any experience with Pygments' source.

  2. Log in to comment