Bug 475933 - Fish syntax reported falsely as error
Summary: Fish syntax reported falsely as error
Status: RESOLVED FIXED
Alias: None
Product: frameworks-syntax-highlighting
Classification: Frameworks and Libraries
Component: syntax (show other bugs)
Version: unspecified
Platform: Arch Linux Other
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-21 17:50 UTC by Matthias
Modified: 2023-11-11 17:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Screenshot 1 (23.25 KB, image/png)
2023-10-21 17:51 UTC, Matthias
Details
Screenshot 1 (16.35 KB, image/png)
2023-10-21 17:52 UTC, Matthias
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias 2023-10-21 17:50:36 UTC
This is a false error flag for the fish scripting language

STEPS TO REPRODUCE
1. echo [(date +"%Y-%m-%dT%T%z")] [FISH] System is updated
2. Send this line in an active fish session
3. You will get this output, as intended

[2023-10-21T19:35:38+0200] [FISH] System is updated

OBSERVED RESULT

See Screenshot 1

The part [FISH] is reported as an error. 
The Kate syntax highlighting does format the specific part according to the setting done within the "error" field in the settings. 

EXPECTED RESULT

The part is actually just a normal input and should be highlighted as the 'normal' setting. 

The brackets most likely confuse the framework, but this is valid code, I just like to print [FISH]

Operating System: Garuda Linux 
KDE Plasma Version: 5.27.8
KDE Frameworks Version: 5.111.0
Qt Version: 5.15.11
Kernel Version: 6.5.7-zen2-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7,4 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
Manufacturer: HP
Product Name: HP EliteBook 820 G3

ADDITIONAL INFORMATION

I want the output as described since it is supposed to look like that in a log file.
Comment 1 Matthias 2023-10-21 17:51:32 UTC
Created attachment 162481 [details]
Screenshot 1
Comment 2 Matthias 2023-10-21 17:52:58 UTC
Created attachment 162482 [details]
Screenshot 1
Comment 3 Bug Janitor Service 2023-11-11 01:49:18 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/syntax-highlighting/-/merge_requests/580
Comment 4 Christoph Cullmann 2023-11-11 14:44:01 UTC
Git commit 78efeefb4e3563577213d0af485cda61ac20e612 by Christoph Cullmann, on behalf of Jonathan Poelen.
Committed on 11/11/2023 at 15:41.
Pushed by cullmann into branch 'master'.

Fish: fix [...] which are not preceded by a variable or command substitution

```fish
echo $foo[1] foo[1]
 #       ~~~        Index
 #              ~~~ Normal
```

M  +20   -0    autotests/folding/highlight.fish.fold
M  +20   -0    autotests/html/highlight.fish.dark.html
M  +20   -0    autotests/html/highlight.fish.html
M  +20   -0    autotests/input/highlight.fish
M  +20   -0    autotests/reference/highlight.fish.ref
M  +42   -8    data/syntax/fish.xml

https://invent.kde.org/frameworks/syntax-highlighting/-/commit/78efeefb4e3563577213d0af485cda61ac20e612
Comment 5 Matthias 2023-11-11 17:45:42 UTC
Thanks!