xml namespaces in wikidpad

20 views
Skip to first unread message

Fxp

unread,
Oct 8, 2008, 3:55:59 PM10/8/08
to wikidpad
Hi,

Just discovered wikidpad and find it great. In my wiki, I frequently
add xml markup such as rdf or dc (dublin core).

Currently any tag is accepted as xml, but the ":" of the namespace let
the interpreter fail and the code is rendered as "<" and ">".

Could this be hacked? And could someone tell me where I can find the
regexp which deals with this replacement ?

Thanks for your help.

François

Michael Butscher

unread,
Oct 10, 2008, 6:55:45 AM10/10/08
to wiki...@googlegroups.com

It is in "extensions\WikiSyntax.py"

At about line 52 you will see:


HtmlTagRE = re.compile(
ur"</?[A-Za-z][A-Za-z0-9]*(?:/| [^\n>]*)?>",
re.DOTALL | re.UNICODE | re.MULTILINE)


replace it by:


HtmlTagRE = re.compile(
ur"</?[A-Za-z][A-Za-z0-9:]*(?:/| [^\n>]*)?>",
re.DOTALL | re.UNICODE | re.MULTILINE)


Michael

Fxp

unread,
Oct 11, 2008, 5:41:57 AM10/11/08
to wikidpad
Thank you Michael,

That's exactly the trick. I now I know where to change the syntax;
Pandora's box is opened :)

Thx again

François

Michael Butscher

unread,
Oct 11, 2008, 9:26:43 AM10/11/08
to wiki...@googlegroups.com
Fxp wrote:
> Thank you Michael,
>
> That's exactly the trick. I now I know where to change the syntax;
> Pandora's box is opened :)

Be aware that the content of the "extensions" directory is overwritten
each time a new version of WikidPad is installed. For your concrete
change this doesn't matter because I include the change in the
installation files for the next version.

If you want to make further changes, you should create a directory
"user_extensions" (as a sibling of "extensions" dir.) if not already
there. Copy "WikiSyntax.py" to "user_extensions" and change it there.


Michael

Reply all
Reply to author
Forward
0 new messages