From b6591e91b037a5c71a68512372ea2da15154fe2f Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Tue, 22 Mar 2011 14:05:45 +0000 Subject: Move mandoc_isdelim() back into libmdoc.h. This fixes an unreported error where (1) -man pages were punctuating delimiters (e.g., `.B a ;') and where (2) standalone punctuation in -mdoc or -man (e.g., ";" on its own line) would also be punctuated. This introduces a small amount of complexity of mdoc_{html,term}.c must manage their own spacing with running print_word() or print_text(). The check for delimiting now happens in mdoc_macro.c's dword(). --- html.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'html.c') diff --git a/html.c b/html.c index 31cc8117..ab57c374 100644 --- a/html.c +++ b/html.c @@ -1,4 +1,4 @@ -/* $Id: html.c,v 1.130 2011/03/22 10:13:01 kristaps Exp $ */ +/* $Id: html.c,v 1.131 2011/03/22 14:05:45 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2011 Ingo Schwarze @@ -508,15 +508,10 @@ print_doctype(struct html *h) name, doctype, dtd); } - void print_text(struct html *h, const char *word) { - if (DELIM_CLOSE == mandoc_isdelim(word)) - if ( ! (HTML_IGNDELIM & h->flags)) - h->flags |= HTML_NOSPACE; - if ( ! (HTML_NOSPACE & h->flags)) { /* Manage keeps! */ if ( ! (HTML_KEEP & h->flags)) { @@ -544,9 +539,6 @@ print_text(struct html *h, const char *word) } h->flags &= ~HTML_IGNDELIM; - - if (DELIM_OPEN == mandoc_isdelim(word)) - h->flags |= HTML_NOSPACE; } -- cgit v1.2.3-56-ge451