While trying to make nested lists collapse/expand when hovering (no JS,
just pure CSS), I noticed that TiddlyWiki seems not to handle nested
lists correctly. Some testing has lead me to believe that the following:
* level 1
** level 2
is translated into this HTML code:
<ul>
<li>level 1, item 1</li>
<ul>
<li>level 1, item 1</li>
</ul>
</ul>
However, correct would be the following:
<ul>
<li>level 1, item 1
<ul>
<li>level 1, item 1</li>
</ul>
</li>
</ul>
(notice how the "level 1" LI now properly surrounds the nested UL)
My problem with this is that I can't use "LI UL" as selector, but have
to use "UL UL" instead. That in turn means that all nested items will
expand at the same time when hovering, which is less than optimal...
Is this something that would take a lot of effort to fix, due to some
parsing issues? Or has it simply been overlooked before?
-- F.
http://trac.tiddlywiki.org/tiddlywiki/ticket/302
I'd never noticed this problem; sometimes it's a shame that browsers
are so good at rendering incorrect HTML :-)
Cheers
Jeremy
--
Jeremy Ruston
mailto:jer...@osmosoft.com
http://www.tiddlywiki.com
> Yup, that's an oversight on my part
Can you say whether it'd be hard to fix? (As I've said, I'm afraid it
might be a complex parser issue - though I'm totally ignorant... )
> I'd never noticed this problem; sometimes it's a shame that browsers
> are so good at rendering incorrect HTML :-)
Worse: Some browsers will ONLY render incorrect HTML *cough*IE*cough* ;)
-- F.
I nominate Martin! :)
--
Daniel Baird
http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
Things That Suck)
Yeah, I also thought this was a Martin shaped fix (I wrote the
original code, but that wikifier code is the kind of code you can wake
up to and not recognise at all).
Cheers
Jeremy
> On 18/02/07, FND <Ace_...@gmx.net> wrote:
> >
> > Wow, that was quick!
> >
> > > Yup, that's an oversight on my part
> >
> > Can you say whether it'd be hard to fix? (As I've said, I'm afraid it
> > might be a complex parser issue - though I'm totally ignorant... )
> >
> > > I'd never noticed this problem; sometimes it's a shame that browsers
> > > are so good at rendering incorrect HTML :-)
> >
> > Worse: Some browsers will ONLY render incorrect HTML *cough*IE*cough* ;)
> >
> >
> > -- F.
> >
> > >
> >
>
>
> --
> Daniel Baird
> http://tiddlyspot.com (free, effortless TiddlyWiki hosting)
> http://danielbaird.com (TiddlyW;nks! :: Whiteboard Koala :: Blog ::
> Things That Suck)
>
> >
>
Hehe - though I assume this means it won't be fixed anytime soon?!
I've tried looking into it myself, but I failed miserably. :/
Too bad, because it's really a downer for my collapsing/expanding of
nested lists...
-- F.
Hehe - though I assume this means it won't be fixed anytime soon?!
Cheers
Jeremy
Sorry, I didn't mean to pressure you...
TW 2.2 definitely has priority over such minor issues.
-- F.
Every wiki I've every worked with has similar problems,
and the reason is similar: they use regular expressions
to process the markup instead of a true parser. This one
may be fixable by tweaking the REs, but this approach
always suffers from edge cases. (On the other hand, I
don't consider nested lists an edge case.)
- Sam
Every wiki I've every worked with has similar problems,
and the reason is similar: they use regular expressions
to process the markup instead of a true parser.
My mistake, then. Sounds like TW does it right.
- Sam
(I have a few other enhancements planned for the wikifiers for 2.3 as
well.)
Martin
On 18 Feb, 23:35, "Daniel Baird" <danielba...@gmail.com> wrote:
> i would guess it's a matter of getting the regular expressions right
> in the wikifier.. which would probably be easy to do to the point
> where it *looks* like it works, but fiendishly difficult to make it
> work correctly in all situations.
>
> I nominate Martin! :)
>
> On 18/02/07, FND <Ace_No...@gmx.net> wrote:
>
>
>
>
>
> > Wow, that was quick!
>
> > > Yup, that's an oversight on my part
>
> > Can you say whether it'd be hard to fix? (As I've said, I'm afraid it
> > might be a complex parser issue - though I'm totally ignorant... )
>
> > > I'd never noticed this problem; sometimes it's a shame that browsers
> > > are so good at rendering incorrect HTML :-)
>
> > Worse: Some browsers will ONLY render incorrect HTML *cough*IE*cough* ;)
>
> > -- F.
>
> --
> Daniel Bairdhttp://tiddlyspot.com(free, effortless TiddlyWiki hosting)http://danielbaird.com(TiddlyW;nks! :: Whiteboard Koala :: Blog ::
> Things That Suck)
Also, I've noticed that other block elements cannot be nested in lists;
e.g. the following code will re-start numbering after the blockquote:
# item 1
<<<
blockquote
<<<
# item 2
I assume that's hard to do because there are no closing tags in the wiki
syntax for list items. I guess this could only be fixed by adding a
starting and closing tag for the list as a whole, like this:
regular text
****
# item 1
<<<
blockquote
<<<
# item 2
****
regular text
Not sure whether it's worth the effort though...
-- F.