> you can't use the "heading" formatter.
>
> You'll need to extend the "list" formatter.

Yes, sure, just the "header" one is easier to consider and also
something to compare. Ok, let's put off the global understanding and
move to the case.

> name: "list",
> match: "^(?:[\\*#;:]+)",
> lookaheadRegExp: /^(?:(?:(\*)|(#)|(;)|(:))+)/mg,
> termRegExp: /(\n)/mg,

Ok, here we have a "name" property with an obvious meaning; the
"match" one means somewhat like "the beginning of the inside-list
text" and the "termRegExp" one means "the end of the inside-list
text", correct? On the other hand, I'm not sure about this in the
following sense: if one writes smth like

* some content {{justDiv{
> some sitation
}}} more content

the whole thing will go to the list item. The same is true for
headings but is not true for tables. So, the meaning of termRegExp is
not that clear although it shouldn't be altered from usual "list"
formatter to my extended one.

Let's make a step aside here. Another -- rather "simple" formatter I
want to implement is this: recognize

<br
/>

as break. In this context the question is how to do this so that in
lists it should also work so that instead of writing

* first line<br />/%
%/second line

one could write just

* first line<br
/> second line

(a small improvment for the markdown concept). This is something to do
with this termRegExp stuff, isn't it?

Now the last thing used in the "list" formatter is the lookaheadRegExp
parameter. What does this exactly mean? I guess this has something to
do with higher-level lists so I should also change this.

> Do you know, how to extend the regExp?

Ok, I didn't use them before; this is an excersize. Let me try to
extend the "match" regExp so that it will eat those

**?

things. So, initial one we have is "^(?:[\\*#;:]+)". Now I'd like to
have a space or a symbol, not "*", and a space (let's skip html-
entities and "*" as markers for the first time). This should probably
be "^([#;:(\\*([^\\*\\s] | ))]+)", right? Although, I should practice
a bit since I'm not sure about the brackets.

Next steps will be -- to change lookaheadRegExp and to change the
code.. this thing looks huge. What will the "w" be when the formatter
is used?

-- 
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