- /*
- * Don't warn about this because it occurs in pod2man and would
- * cause considerable (unfixable) warnage.
- */
- if (NULL == n->prev && MAN_ROOT == n->parent->type)
- man_node_delete(m, n);
+ if (NULL != n->prev)
+ return(1);
+
+ switch (n->parent->tok) {
+ case MAN_SH:
+ /* FALLTHROUGH */
+ case MAN_SS:
+ mandoc_vmsg(MANDOCERR_PAR_SKIP, man->parse, n->line, n->pos,
+ "%s after %s", man_macronames[n->tok],
+ man_macronames[n->parent->tok]);
+ /* FALLTHROUGH */
+ case MAN_MAX:
+ /*
+ * Don't warn about this because it occurs in pod2man
+ * and would cause considerable (unfixable) warnage.
+ */
+ man_node_delete(man, n);
+ break;
+ default:
+ break;
+ }