summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 016e8a62..e100f376 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -164,6 +164,7 @@ static int termp_rs_pre(DECL_ARGS);
static int termp_rv_pre(DECL_ARGS);
static int termp_sh_pre(DECL_ARGS);
static int termp_sm_pre(DECL_ARGS);
+static int termp_sp_pre(DECL_ARGS);
static int termp_sq_pre(DECL_ARGS);
static int termp_ss_pre(DECL_ARGS);
static int termp_sx_pre(DECL_ARGS);
@@ -294,7 +295,7 @@ static const struct termact termacts[MDOC_MAX] = {
{ termp_xx_pre, NULL }, /* Dx */
{ NULL, NULL }, /* %Q */
{ termp_br_pre, NULL }, /* br */
- { NULL, NULL }, /* sp */
+ { termp_sp_pre, NULL }, /* sp */
};
#ifdef __linux__
@@ -1833,6 +1834,27 @@ termp_in_post(DECL_ARGS)
/* ARGSUSED */
static int
+termp_sp_pre(DECL_ARGS)
+{
+ int i, len;
+
+ if (NULL == node->child) {
+ term_vspace(p);
+ return(0);
+ }
+
+ len = atoi(node->child->string);
+ if (0 == len)
+ term_newln(p);
+ for (i = 0; i < len; i++)
+ term_vspace(p);
+
+ return(0);
+}
+
+
+/* ARGSUSED */
+static int
termp_br_pre(DECL_ARGS)
{