[pmwiki-users] Programmatically disabling MarkupExtensions

michael paulukonis xraysmalevich at gmail.com
Tue Sep 3 08:54:03 CDT 2013


My new reciped PmwikiGists has a conflict with one of the MarkupExtensions
components -- "digit en-dash digit", specifically

http://www.pmwiki.org/wiki/Cookbook/Gists
http://www.pmwiki.org/wiki/Cookbook/MarkupExtensions

The gist markup looks like this: (:gist id=5457652 line="2-4":) which will
render as <code data-gist-id="5457652" data-gist-line="2-4"</code>

The MarkupExtensions option "-d" converts the hyphen to an en-dash.
They look almost visually identical, but the en-dash is not recognized by
the third-party javascript library used in PmwikiGists.

The only solution I've been able to come up with is adding

$MarkupExtensions['-d'] = false;

to local/config.php prior to including the MarkupExtensions recipe (as
indicated in the MarkupExtensions documentation).

The inclusion of a line parameter, or a range of lines is something that
may only happen sometimes -- perhaps never -- on a particular page or
entire wiki using this recipe.

Is there any way to disable something like this only when that bit of
markup is invoked?
Short of modifying MarkupExtensions?

MarkupExtensions defines this value when the main include is called -- it's
a global.
PmWikiGists would only disable it when (if) a particular markup uses it --
way after the variable has been established.



-Michael Paulukonis
http://www.xradiograph.com
 <http://goog_2112721603>Interference Patterns (a
blog)<http://www.xradiograph.com%5Cinterference>
@XraysMonaLisa <https://twitter.com/XraysMonaLisa>
http://michaelpaulukonis.com
<http://www.BestAndroidResources.com>

Sent from somewhere in the Cloud
(hearthrug, by the fender)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.pmichaud.com/pipermail/pmwiki-users/attachments/20130903/d86561f9/attachment.html>


More information about the pmwiki-users mailing list