From 3438a5cfefb69c7f5343ce1e20296f7b635cabce Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 11 Jul 2019 17:06:17 +0000 Subject: When parsing a tab character that is not preceded by a space character on an .It -column line, args() sets the MDOC_PHRASEQL flag to Quote the Last word of the Phrase. Even if it turns out this quoting is not needed because the word is already quoted for other reasons, clear the flag at the end of parsing the phrase, such that the flag does not leak to the next phrase. This patch fixes the bug that the trailing Macro on a line of the form .It "wordword" Ta word Macro was incorrectly considered quoted and hence not parsed. Bug found by Havard Eidnes (he@) with the NetBSD gettytab(5) manual page: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=54361 Reported via Thomas Klausner (wiz@). --- mdoc_argv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdoc_argv.c') diff --git a/mdoc_argv.c b/mdoc_argv.c index f4ce4a87..1bfd336b 100644 --- a/mdoc_argv.c +++ b/mdoc_argv.c @@ -1,7 +1,7 @@ -/* $Id: mdoc_argv.c,v 1.119 2018/12/21 17:15:19 schwarze Exp $ */ +/* $Id: mdoc_argv.c,v 1.120 2019/07/11 17:06:17 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2012, 2014-2018 Ingo Schwarze + * Copyright (c) 2012, 2014-2019 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -454,6 +454,7 @@ args(struct roff_man *mdoc, int line, int *pos, mandoc_msg(MANDOCERR_ARG_QUOTE, line, *pos, NULL); mdoc->flags &= ~MDOC_PHRASELIT; } + mdoc->flags &= ~MDOC_PHRASEQL; return ARGS_EOLN; } -- cgit v1.2.3