summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-05-27 12:41:35 -0400
committerShaun McCance <shaunm@gnome.org>2012-09-04 10:00:53 -0400
commitdeb2ecc4fc6ef342992fefaafdc1ce8298be5533 (patch)
treed4c9644a9b67e7ecb86965259eab849cd21ba5c7
parent91ea9a68a67404b7a89feaa15330b276b0bd5827 (diff)
downloadyelp-deb2ecc4fc6ef342992fefaafdc1ce8298be5533.tar.gz
Make the man: uri parser deal with more man page names
The uri parser used to support both man:printf(1) and man:printf.1, but the support for the . variant comes at the cost of not supporting man:printers.conf. Since embedded periods in man pages are not that uncommon, in particular for file format documentation, this patch allows periods inside the name part of a man: uri, as long as it is not followed by a digit. This should cover pretty much all naturally occurring embedded periods, while still supporting the man:printf.1 syntax. https://bugzilla.gnome.org/show_bug.cgi?id=676482
-rw-r--r--libyelp/yelp-uri.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index e21f8939..e53062a8 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -980,7 +980,7 @@ resolve_man_uri (YelpUri *uri)
/* Match group 1 should contain the name; then one of groups 3
* and 4 will contain the section if there was one. Group 6
* will contain any hash fragment. */
- man_not_path = g_regex_new ("man:([^ /.()#]+)"
+ man_not_path = g_regex_new ("man:((?:[^ /.()#]|\\.(?=[^0-9]))+)"
"(\\(([0-9A-Za-z]+)\\)|\\.([0-9A-Za-z]+)|)"
"(#([^/ ()]+))?",
0, 0, &error);