Skip Menu |

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

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

Owner: Nobody in particular
Requestors: gerph [...]

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

Subject: Inserting random value into text when numbers end a line in C
In ANSI_C89 mode (and others - Java, and C both seem to show this) it's possible to insert some text from earlier expressions into the output. This was found on the expression: Blah = 1 << 2 Note the lack of comma at the end. This means that the expression in ANSI_C89 which reads: if ($self->testInt($text, 0, undef, 0, '#stay', 'Decimal')) { captures the entire remaining text. Subsequently, in, sub highlight() we have the section : $text =~ s/^(.)//; my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($1, $attr); which causes $1 from an earlier operation to be inserted into the output document. This is because the regular expression does NOT match, so $1 is not assigned. This should possibly read: if ($text =~ s/^(.)//) { my $c = $1; my $attr = $plug->attributes->{$plug->contextInfo($context, 'attribute')}; $self->snippetParse($c, $attr); } to ensure that the value captured is used correctly and not affected by anything else, and only processed when it matches in the first place.

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

Please report any issues with to