Hi BJ

the text/vnd.tiddlywiki  can be thought of as a 'bag' of rules.
> Unfortunately, we cannot subtract from this bag unless we make sure all
> possible sub -bags work in the intended way
>

I don't quite understand what you're getting at here. The proposal in #345
suggests that the optional vocabulary parameter to the mime type
"text/vnd.tiddlywiki" would specify:

* The parse rules to be applied to the text
* Optional configuration parameters for those parse rules

So, authors would be able to choose exactly which rules are applied.

(but this is not the case, if extlink is removed then the result is not
> what you would expect - unfortunately I am unable to upload the result at
> present).
>

Are you referring to the way that removing the external link parser would
just stop the automatic detection of HTTP URLs, and not affect the pretty
link rule for external links?


> However, as the rules are applied in a sequence, a new rule  with the same
> regex as a previous rule will override that rule.
> eg if we have "extlinkdummy" that has the same regex as "extlink" but
> returns the captured text verbatim, then the "extlink" rule is
> nullified.(the output is what is expected).
> therefore it would seem better to 'override' rules rather than have some
> method of selecting rules. A set of nullifying override rules could be
> build into tw5.
>

I think you're suggesting that the vocabulary should be applied over a
standard set of rules, with the vocabulary specifying rules that should be
overridden or suppressed?

My proposal is slightly different: that vocabularies can cascade, so that,
for instance, one could create a custom vocabulary that was interpreted as
"standard TW5 wiki rules plus Twitter @handles minus wikilinks".


>
> A tiddly specifying this would contain a sequence of rules (using an array
> in json format) that would be applied after all the rules of the 'base'
> type.
>

Right, I think that's consistent, assuming "base type" can be another
vocabulary.


> A second method of varying behaviour could be to allow pre-parsing. - A
> sequence of substitutes would be applied (to the whole text) before the
> main rules. This would be useful when transform/remove of symbols is
> required.
> An example maybe that we want to convert instances of "<<tiddler x>>" to
> "{{x}}"
>

Stephan has proposed something similar: a set of regexp-based
search/replace pairs that would be applied to a tiddler before its text
were parsed.


> This could be implement in addition to the above, ie have a tiddly
> containing two sequences of rules.
>

I agree that the search/replace proposal is orthogonal to the current
discussion about wikitext vocabularies.

Best wishes

Jeremy.




-- 
Jeremy Ruston
mailto:[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWikiDev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/tiddlywikidev.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to