GNOME Bugzilla – Bug 326058
Refactored man page code
Last modified: 2009-09-22 01:48:06 UTC
I'm attaching a work in progress patch for man page support. Much of the code has been refactored and numerous issues have been fixed. I am posting here to get some feedback about any issues still left with the patch. Probably still quite a few, but I don't think it's any worse than what's in HEAD at the moment.
Created attachment 56905 [details] [review] refactored man page code Please provide feedback.
Seems good. The issues in bugs #324750 #321627 #321620 seem fixed. Bug #321146 seems somewhat better than previous output. The mplayer man page (bug #303122) still spews some warning to the console: Unmatched element: sp Unmatched element: Count A bunch of times. Looks good though, seems to fix most of the man page issues I have experienced. I vote for commit.
I want to work a little more on BSD man page macros before committing this.
Created attachment 57000 [details] [review] updated, with support for BSD's mdoc if you want to see the different between this and the last patch, check out the telnet.1 man page before and after. Still needs work, but it's a hell of a lot better than it was.
committed to HEAD with two small changes to ignore Count and sp elements in the man output for the time being. 2006-01-08 Brent Smith <gnome@nextreality.net> * src/yelp-man-parser.c: (yelp_man_parser_parse_file), (yelp_man_parser_free), (parser_parse_line), (args_concat_all), (macro_ignore_handler), (macro_bold_small_italic_handler), (macro_roman_bold_small_italic_handler), (macro_new_paragraph_handler), (macro_insert_self_handler), (macro_title_header_handler), (macro_section_header_handler), (macro_spacing_handler), (macro_define_handler), (macro_tp_handler), (macro_ip_handler), (macro_hanging_paragraph_handler), (macro_mandoc_handler), (macro_url_handler), (macro_rs_re_handler), (macro_mandoc_list_handler), (macro_verbatim_handler), (is_mandoc_manual_macro_parsed), (is_mandoc_manual_macro_callable), (macro_mandoc_utility_handler), (macro_mandoc_listitem_handler), (macro_template_handler), (parser_handle_linetag), (parser_read_until), (parser_escape_tags), (parser_append_given_text_handle_escapes), (parser_append_node), (parser_append_node_attr), (parser_parse_table): * stylesheets/man2html.xsl: man page parser rework, fixes #163404, #321620, #321627, #324750, #326058