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(). --- term.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'term.c') diff --git a/term.c b/term.c index caa4a83a..32b04e9f 100644 --- a/term.c +++ b/term.c @@ -1,4 +1,4 @@ -/* $Id: term.c,v 1.181 2011/03/22 10:13:01 kristaps Exp $ */ +/* $Id: term.c,v 1.182 2011/03/22 14:05:45 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -462,10 +462,6 @@ term_word(struct termp *p, const char *word) sv = word; - if (DELIM_CLOSE == mandoc_isdelim(word)) - if ( ! (TERMP_IGNDELIM & p->flags)) - p->flags |= TERMP_NOSPACE; - if ( ! (TERMP_NOSPACE & p->flags)) { if ( ! (TERMP_KEEP & p->flags)) { if (TERMP_PREKEEP & p->flags) @@ -526,9 +522,6 @@ term_word(struct termp *p, const char *word) if (DECO_NOSPACE == deco && '\0' == *word) p->flags |= TERMP_NOSPACE; } - - if (DELIM_OPEN == mandoc_isdelim(sv)) - p->flags |= TERMP_NOSPACE; } -- cgit v1.2.3-56-ge451