ParameterParser

The ParameterParser is used in several places in TiddlyWiki:

It supports a list of parameters each of the form "name:value". For example:

name:John   location:"Isle of Wight"   [[dietary needs]]:none   really:'yes, really'

Names and values that need to contain spaces may be quoted with single- or double-quotes or double-square brackets. The parser is generally tolerant of additional spaces.

When processing macro parameters, names and values may also be quoted with double-braces which causes them to be evaluated as a JavaScript expression. For example:

title:{{window.title}}

The ParameterParser will cope with either the name or the value being omitted, and will substitute a specified default. This is how the StartupParameters work; the default parameter name is specified as 'open'.

21 February 2011 (created 11 February 2011)
inserted by FC2 system