[frameworks-syntax-highlighting] [Bug 468394] r.xml syntax highlighting definitions miss specified integers (e.g., 3L)

npearlmu bugzilla_noreply at kde.org
Tue Jul 18 21:10:44 BST 2023


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

--- Comment #5 from npearlmu <soft.liquid_0p at icloud.com> ---
Thanks for taking a look at this, and sorry it's taken a few days to get back
to you.  The suggested changes related to handling the suffix separately look
OK to me, and are compatible w/my prefs for formatting of r code (all numerics
-- Floats, Ints, complex, etc. -- get the same formatting, including any
suffix); but I could certainly imagine cases/people/languages where the
preferred behavior would be Christoph's 2nd one (e.g., color Floats and Ints
differently and have the suffix match the number).

To follow up on Jonathan's original reply, though:  I don't have a way of
tracking what's happening under the hood, nor of checking things other than in
pandoc's html output (by way of RStudio's rmarkdown rendering process). You're
saying that you don't see the problem in KDE using that same (version 13)
version of r.xml, yes?  And that the latter doesn't involve use of skylighting?
 So the problem is (probably) somewhere in the chain around pandoc's use of the
skylighting library?

Because it's looking like the actual underlying bug is that the <Int
attribute="Int" context="NumericSuffix"/> rule itself (line 115 in Christoph's
r.xml commit) fails to apply when there's a suffix.  Using Christoph's updated
(v14) r.xml still fails to highlight either the digits or the suffix when run
through pandoc; but simply replacing the <Int ...> rule with a corresponding
<RegExpr ... String="\b[0-9]+"/> rule works as intended.  As I understand
things (based on the KDE docs at
https://docs.kde.org/stable5/en/kate/katepart/highlight.html), the <Int .../>
rule should just behave like a shorthand (but more efficient) version of a
<RegExpr .../> rule with String="\b[0-9]+", so it seems like the problem is
actually in the implementation of <Int ...> rules (in the skylighting
library?).

I'm happy to try to report this as a bug appropriately, but I'm not sure
where/how to do that (I originally got here from the skylighting readme).  I'm
way out of my depth here, as I normally don't do anything directly with this
stuff aside from calling the top-level rendering tool(s) in RStudio.

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



More information about the kde-mac mailing list