Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: ovid [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: (no value)
Fixed in: (no value)



Subject: Syntax highlighting breaks with underscores in numbers (10_000)
Download (untitled) / with headers
text/plain 1.2k
Here's another example: #!/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'; my $num = 10_000; CODE print $highlighter->highlightText($code); The first 10 is rendered in yellow, but the trailing _000 is rendered as magenta. Cheers, Ovid


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.