[w3m-dev 04117] Re: start attribute and value attribute on ordered lists
Hiroyuki Ito <[email protected]> Thu, 04 Nov 2004 20:08:58 +0900 (JST)
| Newsgroups | gmane.comp.web.w3m.devel |
|---|---|
| Message-ID | <[email protected]> |
> start value 0
>
0
firefox IE6
<ol start="-2">
<li>A</li>
<li value="0">B</li>
<li value="-1">C</li>
</ol>
firefox
-2. A
0. B
0. C
start 0 value 0 0
IE6
-2. A
-1. B
0. C
start 0 value 0
> <ol type="a" start="0">
> <li>?
> </ol>
<ol start="-1" type="a">
<li>A</li>
<li>B</li>
<li>C</li>
</ol>
firefox
-1. A
0. B
a. C
IE6
-a. A
@. B
a. C
firefox ()
start value
w3m start, value 0
()
--- file.c.old 2004-11-04 19:02:31.000000000 +0900
+++ file.c 2004-11-04 19:04:44.000000000 +0900
@@ -4180,7 +4180,7 @@
}
PUSH_ENV(cmd);
if (cmd == HTML_UL || cmd == HTML_OL) {
- if (parsedtag_get_value(tag, ATTR_START, &count) && count > 0) {
+ if (parsedtag_get_value(tag, ATTR_START, &count)) {
envs[h_env->envc].count = count - 1;
}
}
@@ -4239,6 +4239,8 @@
count = atoi(p);
if (count > 0)
envs[h_env->envc].count = count;
+ else
+ envs[h_env->envc].count = 0;
}
switch (envs[h_env->envc].env) {
case HTML_UL:
@@ -4272,7 +4274,7 @@
case HTML_OL:
if (parsedtag_get_value(tag, ATTR_TYPE, &p))
envs[h_env->envc].type = (int)*p;
- switch (envs[h_env->envc].type) {
+ switch ((envs[h_env->envc].count > 0)? envs[h_env->envc].type: '1') {
case 'i':
num = romanNumeral(envs[h_env->envc].count);
break;