]> git.cameronkatri.com Git - mandoc.git/commitdiff
Tentative fix of quoted punctuation issue noted by Jason McIntyre, e.g., `Li "!"...
authorKristaps Dzonsons <kristaps@bsd.lv>
Mon, 5 Apr 2010 08:38:37 +0000 (08:38 +0000)
committerKristaps Dzonsons <kristaps@bsd.lv>
Mon, 5 Apr 2010 08:38:37 +0000 (08:38 +0000)
mdoc_macro.c

index 54c07c33f02d55b7d51759d28eb0ff7b5098883b..f7019106c4b3256edad0a02e89cf4667335ebef0 100644 (file)
@@ -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 <kristaps@kth.se>
  *
@@ -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);