+ if (d == DELIM_MAX)
+ d = mdoc_isdelim(p);
+
+ if (may_append &&
+ ! (mdoc->flags & (MDOC_SYNOPSIS | MDOC_KEEP | MDOC_SMOFF)) &&
+ d == DELIM_NONE && mdoc->last->type == MDOC_TEXT &&
+ mdoc_isdelim(mdoc->last->string) == DELIM_NONE) {
+ mdoc_word_append(mdoc, p);
+ return;
+ }
+
+ mdoc_word_alloc(mdoc, line, col, p);
+
+ /*
+ * If the word consists of a bare delimiter,
+ * flag the new node accordingly,
+ * unless doing so was vetoed by the invoking macro.
+ * Always clear the veto, it is only valid for one word.
+ */
+
+ if (d == DELIM_OPEN)
+ mdoc->last->flags |= MDOC_DELIMO;
+ else if (d == DELIM_CLOSE &&
+ ! (mdoc->flags & MDOC_NODELIMC) &&
+ mdoc->last->parent->tok != MDOC_Fd)
+ mdoc->last->flags |= MDOC_DELIMC;
+ mdoc->flags &= ~MDOC_NODELIMC;
+}
+
+static void
+append_delims(struct mdoc *mdoc, int line, int *pos, char *buf)