From ed088b20c8d258b687399136f7b92df974abf6f3 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 5 Apr 2010 08:38:37 +0000 Subject: [PATCH] Tentative fix of quoted punctuation issue noted by Jason McIntyre, e.g., `Li "!"' rendering the "!" outside of scope. --- mdoc_macro.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/mdoc_macro.c b/mdoc_macro.c index 54c07c33..f7019106 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.49 2010/03/31 08:04:57 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.50 2010/04/05 08:38:37 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -818,7 +818,7 @@ in_line(MACRO_PROT_ARGS) * the word. */ - d = mdoc_isdelim(p); + d = ARGS_QWORD == w ? 0 : mdoc_isdelim(p); if (ARGS_QWORD != w && d) { if (0 == lastpunct && ! rew_elem(m, tok)) @@ -954,6 +954,7 @@ blk_full(MACRO_PROT_ARGS) /* Don't emit leading punct. for phrases. */ if (NULL == head && ARGS_PHRASE != c && + ARGS_QWORD != c && 1 == mdoc_isdelim(p)) { if ( ! mdoc_word_alloc(m, line, la, p)) return(0); @@ -1077,7 +1078,8 @@ blk_part_imp(MACRO_PROT_ARGS) if (ARGS_PUNCT == c) break; - if (NULL == body && 1 == mdoc_isdelim(p)) { + if (NULL == body && ARGS_QWORD != c && + 1 == mdoc_isdelim(p)) { if ( ! mdoc_word_alloc(m, line, la, p)) return(0); continue; @@ -1169,7 +1171,8 @@ blk_part_exp(MACRO_PROT_ARGS) /* Flush out leading punctuation. */ - if (NULL == head && 1 == mdoc_isdelim(p)) { + if (NULL == head && ARGS_QWORD != c && + 1 == mdoc_isdelim(p)) { assert(NULL == body); if ( ! mdoc_word_alloc(m, line, la, p)) return(0); @@ -1305,6 +1308,7 @@ in_line_argn(MACRO_PROT_ARGS) break; if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) && + ARGS_QWORD != c && 0 == j && 1 == mdoc_isdelim(p)) { if ( ! mdoc_word_alloc(m, line, la, p)) return(0); @@ -1330,6 +1334,7 @@ in_line_argn(MACRO_PROT_ARGS) } if ( ! (MDOC_IGNDELIM & mdoc_macros[tok].flags) && + ARGS_QWORD != c && ! flushed && mdoc_isdelim(p)) { if ( ! rew_elem(m, tok)) return(0); -- 2.47.1