changelog shortlog tags branches changeset file revisions annotate raw help

Mercurial > hg > plan9front / sys/src/cmd/mothra/rdhtml.c

revision 4346: 293098f5b0b5
parent 3425: dea4e98c1897
child 4347: 48947a421eed
     1.1--- a/sys/src/cmd/mothra/rdhtml.c
     1.2+++ b/sys/src/cmd/mothra/rdhtml.c
     1.3@@ -85,7 +85,7 @@ int strtolength(Hglob *g, int dir, char 
     1.4 
     1.5 void pl_htmloutput(Hglob *g, int nsp, char *s, Field *field){
     1.6 	Fontdata *f;
     1.7-	int space, indent;
     1.8+	int space, indent, flags;
     1.9 	Action *ap;
    1.10 	if(g->state->tag==Tag_title
    1.11 /*	|| g->state->tag==Tag_textarea */
    1.12@@ -139,8 +139,12 @@ void pl_htmloutput(Hglob *g, int nsp, ch
    1.13 			space=1000000;
    1.14 		}
    1.15 	}
    1.16-	plrtstr(&g->dst->text, space, indent, f->font, strdup(s),
    1.17-		g->state->link[0] ? PL_HOT : 0, ap);
    1.18+	flags = 0;
    1.19+	if(g->state->link[0])
    1.20+		flags |= PL_HOT;
    1.21+	if(g->state->strike)
    1.22+		flags |= PL_STR;
    1.23+	plrtstr(&g->dst->text, space, indent, f->font, strdup(s), flags, ap);
    1.24 	g->para=0;
    1.25 	g->linebrk=0;
    1.26 	g->dst->changed=1;
    1.27@@ -691,6 +695,7 @@ void plrdhtml(char *name, int fd, Www *d
    1.28 	g.state->indent=25;
    1.29 	g.state->ismap=0;
    1.30 	g.state->isscript=0;
    1.31+	g.state->strike=0;
    1.32 	g.state->width=0;
    1.33 	g.state->height=0;
    1.34 	g.dst=dst;
    1.35@@ -873,6 +878,10 @@ void plrdhtml(char *name, int fd, Www *d
    1.36 		case Tag_strong:
    1.37 			g.state->font=BOLD;
    1.38 			break;
    1.39+		case Tag_s:
    1.40+		case Tag_strike:
    1.41+			g.state->strike=1;
    1.42+			break;
    1.43 		case Tag_blockquot:
    1.44 			g.spacc=0;
    1.45 			g.linebrk=1;