https://bugs.kde.org/show_bug.cgi?id=441603

--- Comment #2 from jaros...@thinline.cz ---
Hello,

thanks for your time looking into this. It took some digging - there is no
ruby.js file anywhere in /usr on my system anymore, guess that's something that
changed with new Debian - but eventually I managed to find out that the file is
contained in ktexteditor Debian source package and patch it there. Everything
compiled well, I installed libkf5texteditor5 library the compilation produced
and can now confirm that the patch fixes the problem.

I tried to look for any Debian-specific patches but found none. As far as I can
see, kate package has no patches at all and ktexteditor has a single patch
which seems to replace some underscore function definitions with a require of
underscore.js library. This patch was present in previous version of
ktexteditor shipped by Debian.

I also found no change in the ruby.js file between previous (5.54) and current
(5.78) Debian version, the only exception being removal of license text at the
beginning of the file (replaced by "SPDX-License-Identifier: LGPL-2.0-only").

The indentation did work in previous Debian version so I guess something else
must've changed. Since you mentioned that the patch relies on it, syntax
highlighting did change between the versions. The change is pretty minimal
though as far as I can see - regular expressions used to be in green text and
are orange now - so doesn't seem like anything able to cause this regression.

As for non-hacky way to fix this, I am fresh out of ideas. One solution that
comes to mind would be to split the check into two regular expressions with the
first one being the current without the division operator and the second being
the division operator not preceded by another division operator. Which
obviously runs afoul on code like

if 1 == i / 5 and 2 == j /
if s == "I/O" or 3 == i /

That moves us into "second slash after =~ or !~ operator, but don't count
slashes escaped by backslash", which feels like something well beyond my
regexp-fu.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to