From 6c87454429f536b827ffbc372f93ae495cb001d1 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 20 Nov 2014 00:31:28 +0000 Subject: Fix two minibugs reported by Thomas Klausner : 1. The first argument of .Fn is not supposed to be parsed. 2. The .Fn macro is not supposed to reopen its scope after punctuation. --- mdoc_macro.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mdoc_macro.c b/mdoc_macro.c index 5939833f..d4339670 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.144 2014/11/17 06:44:58 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.145 2014/11/20 00:31:28 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -926,7 +926,8 @@ in_line(MACRO_PROT_ARGS) break; } - ntok = ARGS_QWORD == ac ? MDOC_MAX : lookup(tok, p); + ntok = (ac == ARGS_QWORD || (tok == MDOC_Fn && !cnt)) ? + MDOC_MAX : lookup(tok, p); /* * In this case, we've located a submacro and must @@ -991,6 +992,8 @@ in_line(MACRO_PROT_ARGS) if (scope && ! rew_elem(mdoc, tok)) return(0); scope = 0; + if (tok == MDOC_Fn) + mayopen = 0; } else if (mayopen && !scope) { if ( ! mdoc_elem_alloc(mdoc, line, ppos, tok, arg)) return(0); -- cgit v1.2.3