As for the linebreak story..

There were two reasons in asking about another <br /> handler: first,
it should clarify the example with the justDiv wrapper and second,
it's a simple formatter that can be written as an exercise and which
can be of some use.

On the other hand, with enough knowledge one can implement a formatter
of a better design. I would prefer the following (change of the "list"
formatter):

* some text
more text

should be treated as usual;

* some text
  more text   // here we have 2 spaces befor the main text

should be treated as one list item with a line break between "some
text" and "more text"; if there are more spaces than 2 (corresponds to
the current list level), or less than 2 (corresponds to the minimal,
1st list level), than a list item with "some text" and further text
outside the list should be generated;

* some text
** details
  more text

should be treated as follwing: if there are 3 spaces before "more
text", "more text" goes to the second-level list item; if there are 2
-- it goes to the first level list item, I mean like in DOM generated
by

<ul><li>
some text
<ul><li>
details
</li></ul>
more text
</li></ul>

; finally, if there are 4 (more than 3 which corresponds to the level
of "** details" before the "    more text") or 1 space, the "more
text" goes outside the list.

With such a formatter one can easily write things like

* some text
  > some citation

and if the editor's font is set to be monospace, one should even have
this nice indent. On the other hand, I'm not sure if it's possible to
write this formatter in such a way that it will pass all the lines for
further wikification so that

* some text
  | a table |c
  | in a | list |

will work "correctrly". Another small issue will arise if one (I)
would like to combine this with the "arbitrary markers" modification
since the indents will be no longer that convenient: for instanse,

*? a question
  > some related citation

doesn't look that good since before the question there are 3 symbols
and before the citation we have 2. Although, this can be fixed by
further changing the formatter.

Yet, the question "why the justDiv trick works" remains unclear.

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/tiddlywikidev?hl=en.

Reply via email to