> > var f=config.formatters[config.formatters.findByField('name','list')];
> > f.match="^(?:[\\.\\*#;:]+)";
> > f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
>
> Eric, this turns the use of * into a numbered bullet. Is this a
> problem on my side or the code above?
Nuts! Despite that power that regExp pattern matching provides, it's
precisely this kind of subtle stuff that makes it such as PITA to work
with!
The problem is that the parenthesized term: (\.) that was added to the
lookaheadRegExp shifted the index for the other parenthesized terms
that follow it, so that they no longer line up with the corresponding
handlers in the core code. As a result, * now produces a "numbered
list", while # erroneously results in a "definition list". To fix
this, change this:
f.lookaheadRegExp=/^(?:(?:(\.)|(\*)|(#)|(;)|(:))+)/mg;
to
f.lookaheadRegExp=/^(?:(?:([\*\.])|(#)|(;)|(:))+)/mg;
i.e., (\.)|(\*) becomes ([\*\.]), so that only a single set of
parentheses are used.
enjoy,
-e
Eric Shulman
TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TiddlyWiki" 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/TiddlyWiki?hl=en
-~----------~----~----~----~------~----~------~--~---