summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--roff.73
-rw-r--r--roff.c2
-rw-r--r--roff_escape.c2
3 files changed, 5 insertions, 2 deletions
diff --git a/roff.7 b/roff.7
index a9f424d5..90b6ddc7 100644
--- a/roff.7
+++ b/roff.7
@@ -2085,7 +2085,8 @@ defaults to
.Ic \efP .
.It Ic \eg[ Ns Ar name Ns Ic \&]
Interpolate the format of a number register; ignored by
-.Xr mandoc 1 .
+.Xr mandoc 1 ,
+which interpolates an empty string instead.
For short names, there are variants
.Ic \eg Ns Ar c
and
diff --git a/roff.c b/roff.c
index e89ca000..119be89f 100644
--- a/roff.c
+++ b/roff.c
@@ -1535,6 +1535,8 @@ roff_expand(struct roff *r, struct buf *buf, int ln, int pos, char ec)
roff_expand_patch(buf, iendarg, "}", iend);
roff_expand_patch(buf, iesc, "${", iarg);
continue;
+ case 'g':
+ break;
case 'n':
if (iendarg > iarg)
(void)snprintf(ubuf, sizeof(ubuf), "%d",
diff --git a/roff_escape.c b/roff_escape.c
index 51e3d897..3c38ced7 100644
--- a/roff_escape.c
+++ b/roff_escape.c
@@ -158,6 +158,7 @@ roff_escape(const char *buf, const int ln, const int aesc,
case '$':
case '*':
case 'V':
+ case 'g':
case 'n':
rval = ESCAPE_EXPAND;
break;
@@ -165,7 +166,6 @@ roff_escape(const char *buf, const int ln, const int aesc,
case 'M':
case 'O':
case 'Y':
- case 'g':
case 'k':
case 'm':
rval = ESCAPE_IGNORE;