After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 759277 - Incorrectly matches brackets inside strings in JSON files
Incorrectly matches brackets inside strings in JSON files
Status: RESOLVED FIXED
Product: gtksourceview
Classification: Platform
Component: Syntax files
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: GTK Sourceview maintainers
GTK Sourceview maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-09 22:59 UTC by Adam Williamson
Modified: 2015-12-10 11:26 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Adam Williamson 2015-12-09 22:59:40 UTC
Consider the following text:

[
    "foo",
    "bar]"
]

If you syntax highlight it as Python, it correctly matches the brackets (the ] inside one of the strings is ignored for matching purposes). If you syntax highlight it as JSON, the ] inside the second string is considered to close the opening bracket, and the final bracket has no match. This is incorrect.

gtksourceview3-3.19.2-1.1.fc24.x86_64
Comment 1 Sébastien Wilmet 2015-12-10 11:26:46 UTC
Thanks for the bug report. It's fixed on master and gnome-3-18.