-/* $Id: mdoc_macro.c,v 1.123 2013/10/21 23:47:58 schwarze Exp $ */
+/* $Id: mdoc_macro.c,v 1.126 2013/12/31 22:40:12 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
case (REWIND_NONE):
return(1);
case (REWIND_THIS):
+ n->lastline = line -
+ (MDOC_NEWLINE & mdoc->flags &&
+ ! (MDOC_EXPLICIT & mdoc_macros[tok].flags));
break;
case (REWIND_FORCE):
mandoc_vmsg(MANDOCERR_SCOPEBROKEN, mdoc->parse,
mdoc_macronames[n->tok]);
/* FALLTHROUGH */
case (REWIND_MORE):
+ n->lastline = line -
+ (MDOC_NEWLINE & mdoc->flags ? 1 : 0);
n = n->parent;
continue;
case (REWIND_LATER):
maxargs = 1;
break;
case (MDOC_Ek):
- if ( ! (MDOC_SYNOPSIS & mdoc->flags))
- mdoc->flags &= ~MDOC_KEEP;
+ mdoc->flags &= ~MDOC_KEEP;
default:
maxargs = 0;
break;
body = mdoc->last;
}
- for (n = body->child; n && n->next; n = n->next)
- /* Do nothing. */ ;
-
- /*
- * End of sentence spacing: if the last node is a text node and
- * has a trailing period, then mark it as being end-of-sentence.
- */
-
- if (n && MDOC_TEXT == n->type && n->string)
- if (mandoc_eos(n->string, strlen(n->string), 1))
- n->flags |= MDOC_EOS;
-
- /* Up-propagate the end-of-space flag. */
-
- if (n && (MDOC_EOS & n->flags)) {
- body->flags |= MDOC_EOS;
- body->parent->flags |= MDOC_EOS;
- }
-
/*
* If there is an open sub-block requiring explicit close-out,
* postpone closing out the current block