=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/mandoc/html.c,v retrieving revision 1.11 retrieving revision 1.12 diff -c -r1.11 -r1.12 *** src/usr.bin/mandoc/html.c 2010/06/27 20:28:56 1.11 --- src/usr.bin/mandoc/html.c 2010/07/13 01:09:12 1.12 *************** *** 1,6 **** ! /* $Id: html.c,v 1.11 2010/06/27 20:28:56 schwarze Exp $ */ /* ! * Copyright (c) 2008, 2009 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above --- 1,6 ---- ! /* $Id: html.c,v 1.12 2010/07/13 01:09:12 schwarze Exp $ */ /* ! * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above *************** *** 389,396 **** t = NULL; if ( ! (HTML_NOSPACE & h->flags)) ! if ( ! (HTML_CLRLINE & htmltags[tag].flags)) ! putchar(' '); /* Print out the tag name and attributes. */ --- 389,403 ---- t = NULL; if ( ! (HTML_NOSPACE & h->flags)) ! if ( ! (HTML_CLRLINE & htmltags[tag].flags)) { ! /* Manage keeps! */ ! if ( ! (HTML_KEEP & h->flags)) { ! if (HTML_PREKEEP & h->flags) ! h->flags |= HTML_KEEP; ! putchar(' '); ! } else ! printf(" "); ! } /* Print out the tag name and attributes. */ *************** *** 480,490 **** void ! print_text(struct html *h, const char *p) { ! if (*p && 0 == *(p + 1)) ! switch (*p) { case('.'): /* FALLTHROUGH */ case(','): --- 487,497 ---- void ! print_text(struct html *h, const char *word) { ! if (word[0] && '\0' == word[1]) ! switch (word[0]) { case('.'): /* FALLTHROUGH */ case(','): *************** *** 507,525 **** break; } ! if ( ! (h->flags & HTML_NOSPACE)) ! putchar(' '); ! assert(p); ! if ( ! print_encode(h, p, 0)) h->flags &= ~HTML_NOSPACE; /* * Note that we don't process the pipe: the parser sees it as * punctuation, but we don't in terms of typography. */ ! if (*p && 0 == *(p + 1)) ! switch (*p) { case('('): /* FALLTHROUGH */ case('['): --- 514,539 ---- break; } ! if ( ! (HTML_NOSPACE & h->flags)) { ! /* Manage keeps! */ ! if ( ! (HTML_KEEP & h->flags)) { ! if (HTML_PREKEEP & h->flags) ! h->flags |= HTML_KEEP; ! putchar(' '); ! } else ! printf(" "); ! } ! assert(word); ! if ( ! print_encode(h, word, 0)) h->flags &= ~HTML_NOSPACE; /* * Note that we don't process the pipe: the parser sees it as * punctuation, but we don't in terms of typography. */ ! if (word[0] && '\0' == word[1]) ! switch (word[0]) { case('('): /* FALLTHROUGH */ case('['):