Skip Menu |

This queue is for tickets about the Syntax-Highlight-Engine-Kate CPAN distribution.

Report information
The Basics
Id: 76160
Status: resolved
Priority: 0/
Queue: Syntax-Highlight-Engine-Kate

People
Owner: MANWAR [...] cpan.org
Requestors: ovid [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: (no value)
Fixed in: 0.12



Subject: Inline Pod breaks highlighting
The latest version of Syntax::Highlight::Engine::Kate::Perl breaks syntax highlighting if there is embedded POD. All code after the =cut is rendered as "Comment". The following minimal test case demonstrates the error. Cheers, Ovid #!/usr/bin/env perl use strict; use warnings; use Term::ANSIColor ':constants'; use Syntax::Highlight::Engine::Kate::Perl; my $highlighter = Syntax::Highlight::Engine::Kate::Perl->new( format_table => { 'Keyword' => [ GREEN, RESET ], 'Comment' => [ BLUE, RESET ], 'Decimal' => [ YELLOW, RESET ], 'Float' => [ YELLOW, RESET ], 'Function' => [ CYAN, RESET ], 'Identifier' => [ RED, RESET ], 'Normal' => [ MAGENTA, RESET ], 'Operator' => [ CYAN, RESET ], 'Preprocessor' => [ RED, RESET ], 'String' => [ RED, RESET ], 'String Char' => [ RED, RESET ], 'Symbol' => [ CYAN, RESET ], 'DataType' => [ YELLOW, RESET ], } ); my $code = <<'CODE'; sub dec { my $arg = shift; return $arg-- } =head1 NAME =cut sub inc { my $arg = shift; return $arg++; } CODE print $highlighter->highlightText($code);
Hi, Thanks reporting the issue. I have received pull request kindly submitted by @kiwiroy to address this issue. https://github.com/manwar/Syntax-Highlight-Engine-Kate/pull/15 I will be reviewing the PR and release the patch very soon. Best Regards, Mohammad S Anwar
Patch has been released.