> > braces (which should be rendered so that they're interpreted as a CSS
> > style designation) are being interpreted to mean that there's an
> > evaluated parameter, instead of just getting passed through as
> > straight text.
>
> I suspect the same.  I may be able to fix it.  I'll post a follow-up
> when/if I have an update...

It turns out that the problem isn't related to either the definition
or use of the aliases but is, in fact, a TW *core* bug!  If you enter
"{{some-name{text}}}" directly into a tiddler in an *empty* TW
document and the same rendering error will still occur, even though
there are *no plugins in the document*.  Fortunately, after a bit more
investigation, I have been able to isolate the problem: its due to the
use of a hyphen ("-") in the CSS classname.

According to CSS standards, the syntax for an identifier (such as a
CSS classname) is permitted to contain letters, numbers, underscore,
or hyphen characters.  However, the TW core code that matches the
{{classname{...}}} syntax uses a text pattern (i.e, "regular
expression") that only matches classnames containing letters, numbers
and underscores... but does *not* match hyphens.  As a result, even
though "some-name" is a valid CSS classname, "{{some-name{...}}}" is
not recognized by TW as a valid CSS wrapper, and is improperly
rendered as a result.

For the technically minded... the error originates with this line in
the TW core source:
   var lookaheadRegExp = /\{\{[\s]*([\w]+[\s\w]*)[\s]*\{(\n?)/mg;
which might be changed to allow hyphens:
   var lookaheadRegExp = /\{\{[\s]*([\w-]+[\s\w-]*)[\s]*\{(\n?)/mg;

Until a future core release can fix this issue, a simple work around
is to just omit the hyphens from your custom CSS classnames (e.g.,
instead of "some-name" use "somename" or "someName").

-e

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

Reply via email to