https://bugs.kde.org/show_bug.cgi?id=407327
Bug ID: 407327 Summary: Perl5 syntax highlight gets confused at // Product: kate Version: 18.08.0 Platform: Debian testing OS: Linux Status: REPORTED Severity: minor Priority: NOR Component: syntax Assignee: kwrite-bugs-n...@kde.org Reporter: hei...@lsd.dk Target Milestone: --- SUMMARY With some files, the perl syntax highlighting gets confused. STEPS TO REPRODUCE 1. Create a new file 2. Paste in the two lines: $x = ns // ""; print $x; 3. Save the file as foo.pl OBSERVED RESULT The syntax highlight goes wrong at the second slash. Everything after that is mostly green EXPECTED RESULT The highlighting should be right. "print" should be black. SOFTWARE/OS VERSIONS Debian/Buster KDE Plasma Version: 4:5.14.5.1-1 (debian plasma-workspace) KDE Frameworks Version: KDE Frameworks 5.54.0 Qt Version: Qt 5.11.3 (built against 5.11.3) The xcb windowing system Kate Part Version 5.54.0 ADDITIONAL INFORMATION It looks like the problem has something to do with the "//" operator. In some contexts that works all right, like if I use $ns instead of ns. The original code example is from Catmandu::Exporter::RDF, from libcatmandu-rdf-perl 0.32-2, where the line looks like this: RDF::aREF::Decoder->new( ns => $_[0]->ns // ($_[0]->ns eq 0 ? { } : RDF::NS->new), callback => $_[0]->model ); -- You are receiving this mail because: You are watching all bug changes.