[w3m-dev 00817] Re: '\n' in <textarea>

From: Okabe Katsuya (okabek@guitar.ocn.ne.jp)
Date: Fri Jun 02 2000 - 08:38:18 CDT


Hironori Sakamoto <h-saka@lsi.nec.co.jp> writes:

> $B:dK\$G$9!#(B
>
> <textarea>$B!A(B</textarea> $BFb$N2~9T$,6uGr$KCV$-49$o$C$F$7$^$&$h$&$G$9!#(B
> file.c $B$N(B HTMLlineproc1() $B$N:G=i$N(B read_token() $B$r(B
>
> --- file.c.1 Thu Jun 1 23:18:17 2000
> +++ file.c Fri Jun 2 21:15:51 2000
> @@ -3914,7 +3914,8 @@
> str = tmp->ptr;
> obuf->status = R_ST_NORMAL;
> }
> - while (read_token(tok, &str, &obuf->status, 0, 0)) {
> + while (read_token(tok, &str, &obuf->status,
> + (obuf->flag & (RB_INTXTA|RB_XMPMODE|RB_LSTMODE)) ? 1 : 0, 0)) {
> char *p = tok->ptr;
> int status, cmd = -1;
> if (ST_IS_COMMENT(obuf->status))
>
> $B$H$9$l$P$$$$$N$G$7$g$&$+!)(B
> $B!t(B $B:G6a%@%a$J$s$G<+?.$"$j$^$;$s!#(B

$BNI$$$H;W$$$^$9(B.
$B:#%A%'%C%/$7$?$i(B, <xmp>, <listing> $B$b$&$^$/F0$$$F$^$;$s$G$7$?(B.

--- file.c.old Thu Jun 1 13:43:09 2000
+++ file.c Fri Jun 2 22:29:10 2000
@@ -3930,7 +3985,8 @@
            str = tmp->ptr;
            obuf->status = R_ST_NORMAL;
         }
- while (read_token(tok, &str, &obuf->status, 0, 0)) {
+ while (read_token(tok, &str, &obuf->status,
+ obuf->flag & (RB_INTXTA|RB_XMPMODE|RB_LSTMODE), 0)) {
            char *p = tok->ptr;
            int status, cmd = -1;
            if (ST_IS_COMMENT(obuf->status))
@@ -3966,13 +4022,13 @@
            /* <XMP> .. </XMP> : Don't process tag */
     /* <LISTING>..</LISTING> : ignore tag */
            else if (obuf->flag & (RB_XMPMODE|RB_LSTMODE)) {
+ str -= tok->length;
                if (obuf->flag & RB_XMPMODE && cmd == HTML_N_XMP ||
                    obuf->flag & RB_LSTMODE && cmd == HTML_N_LISTING) {
- str -= tok->length;
                    break;
                }
- goto read_as_plain;
- }
+ goto read_as_plain;
+ }
            /* script */
            else if (obuf->flag & RB_IGNORE) {
                if (TAG_IS(tok->ptr, obuf->ignore_tag->ptr,

-- 
    $B2,It9nLi(B
    e-mail: okabek@guitar.ocn.ne.jp
------------------------------------------------



This archive was generated by hypermail 2b29 : Wed Jul 19 2000 - 10:30:56 CDT