[Pmwiki-users] pmwiki.org converted to 2.0.devel27

Patrick R. Michaud pmichaud
Mon Nov 29 08:13:16 CST 2004


On Mon, Nov 29, 2004 at 06:17:51PM +1300, John Rankin wrote:
> 
> Consider a MarkupQuickReference page showing examples of all markup 
> effects, while hiding the markup to produce them.
> If an author mouses over a particular effect, the markup to
> generate that effect displays as a tool tip. For example, if
> an author mouses over superscript (which is rendered as
> superscript text), the tooltip is '^superscript^'

This sounds like an *excellent* idea, I'd like to incorporate something
like this into the distribution.  Some thoughts...

> The markup 
>     {text:text definition}
> generates
>     <dfn title='text definition'>text</dfn>
> Thus
>     {'^superscript^':'^superscript^'}
> generates
>     <dfn title="'^superscript^'"><sup>superscript</sup><dfn>

The use of a single colon as the significant character seems to invite
markup conflicts -- i.e., does 
   {mailto:pmichaud at pobox.com}  
become
   {<a href='mailto:pmichaud at pobox.com'>pmichaud at pobox.com</a>}
or
   <dfn title='pmichaud at pobox.com'>mailto</dfn>

In a similar vein, is
   {+From: pmichaud at pobox.com+}
rendered as
   <ins>From: pmichaud at pobox.com</ins>
or
   <dfn title='pmichaud at pobox.com+'>+From</dfn>

Perhaps {:text:text definition} instead?

> In this example, the title text is wrapped in " ... " instead
> of ' ... ' because it already contains a ' character. The
> code takes care of this automatically.

Easier may be to simply convert any single quotes in the text
definition to "&#036;".

> And if you just write {text:text definition} ie with no leading
> markup characters, it generates
>     <dfn title='text definition' class='definition'>text</dfn>
> The definition class adds a border-bottom: 1px dotted; style.

Correctly detecting leading markup characters might be a bit tricky,
although I guess you could simply assume that anything not beginning
with an alphanumeric (or quote?) is some sort of markup and so 
should use class='markup' instead of class='definition' in the <dfn>
tag.

Pm



More information about the pmwiki-users mailing list