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

            Bug ID: 464048
           Summary: Broken syntax highlight when using constructions like
                    '{}' or "${VAR}" in BASH source code
    Classification: Applications
           Product: kile
           Version: 2.9.93
          Platform: OpenSUSE
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: editor
          Assignee: michel.lud...@gmail.com
          Reporter: vojtech.zei...@opensuse.org
  Target Milestone: ---

Created attachment 155133
  --> https://bugs.kde.org/attachment.cgi?id=155133&action=edit
kile_syntax_1.png

I'm using LaTeX package minted to show syntax highlight with R or BASH source
code. There are certain constructions which completely mess up syntax in whole
editor (see further).

I'll describe examples accompanied by screenshots. The discussed TeX source
file is at
https://github.com/V-Z/course-linux-command-line-bash-scripting-metacentrum/blob/master/presentation/linux_bash_metacentrum_course.tex
if needed.

File kile_syntax_1.png

Probably not the best example of syntax problems I found as I show on line 1749
wrong code, the syntax highlight behaves technically probably correctly, but
natural human reading would be different. Following examples are really
problematic.

Files kile_syntax_2.png and kile_syntax_3.png

I don't see any wrong code on my construction with find ... | parallel... As
You use (and as can be easily tested within Kile with the input file),
problematic construction is whatever like '{}' causing basically rest of file
to be yellow, at least to another such construction. As file kile_syntax_3.png
shows changing
find . -name '*.jpg' -print | parallel --bar convert '{}' '{.}.png'
to
find . -name '*.jpg' -print | parallel --bar convert {} {.}.png
(and similarly for other cases) fixes the display issue. In any case, rendering
of resulting PDF is correct. So I think this is clear bug of Kile or it's
syntax highlight component.

File kile_syntax_4.png

I admit that writing on beginning of line \(ToRemember\) isn't the best idea
(should be commented out or so), but what I think is bug of Kile or it's syntax
highlight component is fact that it breaks syntax highlight of the
\end{bashcode}, \end{frame} and following XeLaTeX code. Of course, if I comment
the problematic line with \(ToRemember\) using #, everything is fine.
Interestingly, line \Number doesn't cause any problem. Anyway, I think it's a
bug that whatever content of bascode minted environment influences following
XeLaTeX code.

File kile_syntax_5.png

Partially, Kile works correctly as the 1st slide contains incomplete 'case'
construction, but same problem as with previous example, I think whatever
inside bashcode minted environment shouldn't influence of highlight of
"standard" XeLaTeX code. Of course, if I add 'esac' to the end, this slide will
be OK, but the following will again break due to "o)" starting without "case".
More generally, I think it can happen often that You need to show some
construction on multiple slides, and I think the situation doesn't have good
solution now. Good think is that rendering of PDF is correct, so I think it's
problem with Kile.

Files kile_syntax_6.png and kile_syntax_7.png

It's similar problem as shown on files kile_syntax_2.png and kile_syntax_3.png.
Construction like "${VAR}" completely break syntax highlight in Kile editor.
And I think this is a bug.

Interestingly, I hadn't opened this for some time and I don't recall such
issues with previous versions (I use openSUSE Tumbleweed, which is
rolling-release, thus usually having newest versions of everything). Of course
I'd be happy to provide any further cooperation as I'd like to see this fixed.

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

Reply via email to