All
I looked up the regular expression for custom formatting which was
/\{\{[\s]*([\w]+[\s\w]*)[\s]*\{(\n?)/gm. I could not get it to
capture the
content for the CSS class and modified it to
/\{\{[\s]*([\w]+[\s\w]*)[\s]*\{([^\}]+)\}\}\}/gm which worked for my
purposes.
It was good that the SystemInfoPlugin addressed my question as the
detail
kindly provided by Eric about spelunking the depths of the wikify
processor
was a bit (actually a lot) over my head for now.
Thanks for the help
Steve Wharton
On Feb 18, 1:21 pm, Eric Shulman <[email protected]> wrote:
> > Where can I find the default regexp expressions? I also want to use
> > the one to match "{{className{item to apply class name to}}}".
>
> You can use
> http://www.TiddlyTools.com/#SystemInfoPlugin
> to examine the current runtime values for all the TW 'formatters'.
> Just select a specific formatter from the 'formatters' droplist and
> you can see it's definitions.
>
> Alternatively, you could directly view the TW source using an external
> text editor, and search for this line in the code:
> config.formatters = [
> which will let you examine the statically-defined data that is used to
> initial the default runtime formatters array used by wikify() to parse
> wiki syntax.
>
> By convention, each formatter has a few standardized properties and
> methods:
> name
> - a unique ID that can be used to lookup the formatter
> match
> - a text pattern used to find the *start* of a given wiki syntax
> sequence
> lookaheadRegExp
> - a regexp pattern to parse the entire syntax and extract values
> for processing
> handler(w)
> - the function that does the processing when the associated
> 'match' pattern is found
> - 'w' is a 'context object' that holds the current state of the
> wikify() parsing process,
> and includes a copy of the tiddler 'source' text being parsed,
> the current 'matchStart' and 'nextMatch' index positions within that
> source, and a target 'output' DOM element in which to render the
> results.
>
> In addition to these properties/methods, some formatters define extra
> properties or 'helper' methods that vary depending upon the purpose
> and design of that specific formatter.
>
> Hopefully, this info should be enough to start your journey deep into
> the core's wikify() parser. Of course, feel free to ask more
> questions...
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---