GNOME Bugzilla – Bug 697136
external tools: link parser fails to linkify when line number not followed by whitespace
Last modified: 2019-03-23 20:50:39 UTC
Many programs output information in the format filename:line_number:text and so it's great that the external tools link parser can parse this and generate links. Unfortunately, it fails to generate a link if the text does not begin with whitespace. To see this, create an external tool which runs this command: grep -R -n sort /path/to/gedit/sources --include='*.c' In the output, most lines get linkified, but lines without leading whitespace don't, e.g. /path/to/gedit/sources/gedit-window.c:1011:get_languages_sorted_by_section (GeditWindow *window)
Maybe you can provide an unit test for this? See: https://git.gnome.org/browse/gedit/tree/plugins/externaltools/tools/linkparsing_test.py
Created attachment 242804 [details] [review] fix Here's a test case along with a fix for the bug.
Review of attachment 242804 [details] [review]: Looks good.
Great. Can you push this? I don't yet have commit rights in GNOME (though I should ask for them soon!)
Please ask for the account and point to us if you need somebody to give some agreement.