From 21bb451eea95935f615ded5d57dc8c6c9d2224f8 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Mon, 31 May 2010 15:42:09 +0000 Subject: Add ability to interpret initial free-form lines as part of a `Bl -column' up until the first `It'. This is UGLY and should have all sorts of warnings, and will. On the one hand, it fits with groff's notion of tabs and tab-spaces. On the other hand, it's not really "free-form" text any more. Note that this does not yet accomodate for macros coming on these lines. --- mdoc_macro.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index f80c84b7..f3890f84 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.76 2010/05/31 11:52:06 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.77 2010/05/31 15:42:09 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -1118,7 +1118,7 @@ blk_full(MACRO_PROT_ARGS) /* If we've already opened our body, exit now. */ if (NULL != body) - return(1); + goto out; #ifdef UGLY /* @@ -1145,6 +1145,16 @@ blk_full(MACRO_PROT_ARGS) if ( ! mdoc_body_alloc(m, line, ppos, tok)) return(0); +out: + if ( ! (MDOC_FREECOL & m->flags)) + return(1); + + if ( ! rew_sub(MDOC_BODY, m, tok, line, ppos)) + return(0); + if ( ! rew_sub(MDOC_BLOCK, m, tok, line, ppos)) + return(0); + + m->flags &= ~MDOC_FREECOL; return(1); } -- cgit v1.2.3-56-ge451