commit d3e79f5b611ac9f0b9eedbb4cdeaa167ec84b2ba from: Russ Cox date: Tue Nov 11 18:59:48 2008 UTC htmlroff: ignore \X... text; allow delims besides quote commit - 11257e5a43ac47666dd2ffb4b15fcff8ceb045a9 commit + d3e79f5b611ac9f0b9eedbb4cdeaa167ec84b2ba blob - e029db35fd7a8a52f24bf9f66d49bf1e3fc1c702 blob + 4aa745324101a24e39811b8b3be69b94953f5453 --- src/cmd/htmlroff/t10.c +++ 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);