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 759692 - Search: a trailing space is sometimes added to the entry
Search: a trailing space is sometimes added to the entry
Status: RESOLVED FIXED
Product: devhelp
Classification: Applications
Component: General
git master
Other Linux
: Normal normal
: ---
Assigned To: devhelp-maint
devhelp-maint
Depends on:
Blocks:
 
 
Reported: 2015-12-20 13:09 UTC by Sébastien Wilmet
Modified: 2016-01-27 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Sébastien Wilmet 2015-12-20 13:09:31 UTC
Try:

$ devhelp --search gtk_text_iter_forward_lines

There is only one search result, the exact link. But the search entry contains a trailing space, like this:
"gtk_text_iter_forward_lines "

I think it doesn't happen with all symbols. It looks like a g_strstrip() is needed somewhere in Devhelp, or fixing the problem at the source in GTK-Doc maybe. It anyway needs some investigation to know where the space come from.
Comment 1 Frederic Peters 2016-01-27 11:45:38 UTC
Looking at the source .devhelp2 file it has this:

  <keyword type="function" name="gtk_text_iter_forward_line ()" link="GtkTextIter.html#gtk-text-iter-forward-line"/>

And the character before the parentheses is not an ASCII space but a non-breaking space and it's not stripped correctly.

I went the easy way and added custom handling for this precise situation. (missing a general utf-8 capable g_strstrip)

commit b5c1595b450a4caec167c1b82c7c4a874405d7b6
Author: Frédéric Péters <fpeters@0d.be>
Date:   Wed Jan 27 12:41:17 2016 +0100

    parser: handle stripping of non-breaking space before parentheses
    
    https://bugzilla.gnome.org/show_bug.cgi?id=759692