summaryrefslogtreecommitdiffstats
path: root/mdoc_action.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_action.c')
-rw-r--r--mdoc_action.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mdoc_action.c b/mdoc_action.c
index aad0bb66..0c84a87f 100644
--- a/mdoc_action.c
+++ b/mdoc_action.c
@@ -457,6 +457,17 @@ post_sh(POST_ARGS)
if (SEC_NONE == m->lastnamed || SEC_CUSTOM != sec)
m->lastnamed = sec;
+ /*
+ * Switch the parser's SYNOPSIS mode, to be copied
+ * into individual nodes when creating them.
+ * Note that this mode can also be set and unset
+ * using the roff nS register.
+ */
+ if (SEC_SYNOPSIS == sec)
+ m->flags |= MDOC_SYNOPSIS;
+ else
+ m->flags &= ~MDOC_SYNOPSIS;
+
/* Some sections only live in certain manual sections. */
switch ((m->lastsec = sec)) {