Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 152930 Details for
Bug 210456
Click some search results in yelp: Could not load document
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
handle cross references a bit better
yelp-2.18.1-man-xrefs.patch (text/plain), 2.58 KB, created by
Matthias Clasen
on 2007-04-18 17:37:30 UTC
(
hide
)
Description:
handle cross references a bit better
Filename:
MIME Type:
Creator:
Matthias Clasen
Created:
2007-04-18 17:37:30 UTC
Size:
2.58 KB
patch
obsolete
>--- yelp-2.18.1/src/yelp-man-parser.c.man-xrefs 2007-04-18 13:33:14.000000000 -0400 >+++ yelp-2.18.1/src/yelp-man-parser.c 2007-04-18 13:33:19.000000000 -0400 >@@ -339,6 +339,20 @@ > else > parser->ins = parser_append_node (parser, b); > >+ if (ptr->next) { >+ gchar *tmp = ptr->next->data; >+ >+ if (tmp[0] == '(' && g_ascii_isdigit (tmp[1]) && >+ (tmp[2] == ')' || (g_ascii_isalpha (tmp[2]) && tmp[3] == ')'))) { >+ tmp = g_strconcat (ptr->data, " ", tmp, NULL); >+ parser_append_given_text_handle_escapes (parser, tmp, TRUE); >+ g_free (tmp); >+ parser->ins = parser->ins->parent; >+ ptr = ptr->next->next; >+ continue; >+ } >+ } >+ > parser_append_given_text_handle_escapes (parser, ptr->data, TRUE); > parser->ins = parser->ins->parent; > >@@ -1554,15 +1568,18 @@ > } > else if ((make_links) && (*ptr == '(')) { > gchar *space_pos; >- gchar *tmp_cur; > gchar *url; > gchar c; >+ gchar *name_end; >+ gchar *num_start; >+ gchar *num_end; > > space_pos = ptr; > > while (space_pos != anc && *(space_pos - 1) == ' ') { > space_pos--; > } >+ name_end = space_pos; > > while (space_pos != anc && *(space_pos - 1) != ' ') { > space_pos--; >@@ -1570,13 +1587,18 @@ > > if (space_pos != ptr && > g_ascii_isdigit(*(ptr+1)) && >- *(ptr+2) == ')') { >- >+ (*(ptr+2) == ')' || (g_ascii_isalpha (*(ptr+2)) && *(ptr+3) == ')'))) { >+ num_start = ptr; >+ if (*(ptr+2) == ')') >+ num_end = ptr + 2; >+ else >+ num_end = ptr + 3; >+ >+ g_print ("text %s\n", anc); > ptr+=3; > > parser_ensure_P (parser); > >- tmp_cur = ptr; > ptr = space_pos; > > c = (*ptr); >@@ -1584,13 +1606,15 @@ > parser_append_given_text (parser, anc); > *ptr = c; > anc = ptr; >+ ptr = num_start; > >- ptr = tmp_cur; >- >- c = *(ptr); >- *(ptr) = '\0'; >- url = g_strdup_printf ("man:%s(%c)", anc, *(ptr - 1)); >+ c = *name_end; >+ *name_end = '\0'; >+ *num_end = '\0'; >+ g_print ("name part %s, num %s\n", anc, num_start + 1); >+ url = g_strdup_printf ("man:%s(%s)", anc, num_start + 1); > >+ g_print ("link %s\n", url); > parser->ins = parser_append_node (parser, "UR"); > > parser->ins = parser_append_node (parser, "URI"); >@@ -1600,7 +1624,8 @@ > parser_append_given_text (parser, anc); > parser->ins = parser->ins->parent; > >- *(ptr) = c; >+ *name_end = c; >+ *num_end = ')'; > anc = ptr; > > g_free (url);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 210456
:
138313
|
152929
| 152930