NEWS for ELinks 0.11.5
[elinks/elinks-j605.git] / contrib / colws.diff
blob83700b52c82891893ca328387f32e5e86630b731
1 I like to see two spaces after full stops/periods, especially when HTML
2 authors have put them there. The following patch to 20020305 achieves
3 that.
5 You might like to do the same for colons.
7 It shouldn't adversely affect web pages. Two spaces will only appear
8 where the HTML contains them. I will be using it: you may do with it as
9 you wish.
11 --- elinks/src/document/html/parser.c.~1.25.~ Tue Mar 5 22:42:43 2002
12 +++ elinks/src/document/html/parser.c Thu Apr 11 16:13:10 2002
13 @@ -1997,7 +1997,7 @@
15 void parse_html(unsigned char *html, unsigned char *eof, void (*put_chars)(void *, unsigned char *, int), void (*line_break)(void *), void (*init)(void *), void *(*special)(void *, int, ...), void *f, unsigned char *head)
17 - /*unsigned char *start = html;*/
18 + unsigned char *start = html;
19 unsigned char *lt;
20 putsp = -1;
21 line_breax = table_level ? 2 : 1;
22 @@ -2048,6 +2048,7 @@
23 put_chrs(lt, html - 1 - lt, put_chars, f);
24 put_chrs(" ", 1, put_chars, f);
26 + if ((html > start+1) && (*(html-2)=='.' || *(html-2)==':')) putsp = 1;
27 skip_w:
28 while (html < eof && WHITECHAR(*html)) html++;
29 /*putsp = -1;*/