aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/htmlroff
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd/htmlroff')
-rw-r--r--src/cmd/htmlroff/t10.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/cmd/htmlroff/t10.c b/src/cmd/htmlroff/t10.c
index e029db35..4aa74532 100644
--- a/src/cmd/htmlroff/t10.c
+++ b/src/cmd/htmlroff/t10.c
@@ -69,10 +69,16 @@ e_bang(void)
int
e_X(void)
{
- int c;
+ int c, c1;
- while((c = getrune()) >= 0 && c != '\'' && c != '\n')
- outrune(c);
+ c1 = getrune();
+ if(c1 < 0 || c1 == '\n') {
+ c = c1;
+ c1 = 0;
+ } else {
+ while((c = getrune()) >= 0 && c != c1 && c != '\n')
+ ;
+ }
if(c == '\n'){
warn("newline in %CX'...'", backslash);
outrune(c);