summaryrefslogtreecommitdiff
path: root/src/devices
diff options
context:
space:
mode:
authorwl <wl>2006-03-27 17:31:06 +0000
committerwl <wl>2006-03-27 17:31:06 +0000
commitf6bb502359da9f435ad95caa5aa66707884560f3 (patch)
tree401ce138ddf99f849067700cd443ab88f5fddb76 /src/devices
parentf45fbe58e05333fc25dd84e0e81ce1cc6b64b72a (diff)
downloadgroff-f6bb502359da9f435ad95caa5aa66707884560f3.tar.gz
* src/roff/troff/input.cpp (encode_char): Emit special characters
for -Thtml as `\[...]'. * src/devices/grohtml/post-html.cpp (page::add_and_encode): Updated. * doc/groff.texinfo (\X): Updated.
Diffstat (limited to 'src/devices')
-rw-r--r--src/devices/grohtml/post-html.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/devices/grohtml/post-html.cpp b/src/devices/grohtml/post-html.cpp
index 5bd7fc7d..3b5ee28a 100644
--- a/src/devices/grohtml/post-html.cpp
+++ b/src/devices/grohtml/post-html.cpp
@@ -1379,9 +1379,9 @@ static char *to_unicode (unsigned int ch)
* add_and_encode - adds a special string to the page, it translates the string
* into html glyphs. The special string will have come from x X html:
* and can contain troff character encodings which appear as
- * \(char\). A sequence of \\ represents \.
+ * \[char]. A sequence of \\ represents \.
* So for example we can write:
- * "cost = \(Po\)3.00 file = \\foo\\bar"
+ * "cost = \[Po]3.00 file = \\foo\\bar"
* which is translated into:
* "cost = &pound;3.00 file = \foo\bar"
*/
@@ -1399,15 +1399,15 @@ void page::add_and_encode (style *s, const string &str,
if (s->f == NULL)
return;
while (i < str.length()) {
- if ((i+1<str.length()) && (str.substring(i, 2) == string("\\("))) {
+ if ((i+1<str.length()) && (str.substring(i, 2) == string("\\["))) {
// start of escape
- i += 2; // move over \(
+ i += 2; // move over \[
int a = i;
- while ((i+1<str.length()) && (str.substring(i, 2) != string("\\)"))) {
+ while ((i<str.length()) && (str.substring(i, 1) != string("]"))) {
i++;
}
int n = i;
- if ((i+1<str.length()) && (str.substring(i, 2) == string("\\)")))
+ if ((i<str.length()) && (str.substring(i, 1) == string("]")))
i++;
else
n = -1;