Hello list, --- I'm trying to add a feature to ZWiki by patching moin_support.py, but it's not very obvious. I need some kind of line break feature, so this markup: * Line 1 <linebreak> Line 2 <linebreak> Line 3 becomes exactly what you'd think. This is for example useful for typing in addresses or other contact-information. It might be accomplished merely by allowing <br>-tags, but perhaps that's a little off key in the world of MoinMoin. And besides, it isn't obvious how to do that either ;) \malthe ---- mail: mborch@3avod.dk blog: www.3avod.dk/blog/ crypto-key: 3avod.dk/keys/mborch.asc --------------------------------------
Hi Malthe, I don't think moin markup allows html tags, so br is out. Also, consider whether this work will really pay off. Unless it gets incorporated into the upstream MoinMoin code, it might or might not make sense to support a non-standard moin markup feature in the shipping Zwiki. But I don't want to discourage you, perhaps you just want this for local use. It's not clear to me either, but I think: - the class you need to change is Parser - start by looking at formatting_rules. The format() method may also be relevant. - try to find some other formatting rule that's similar, and copy/tweak it. Perhaps <li> ? - the regexps named there are somehow handled by the similarly-named repl methods, like _li_repl() - you might find more help with this code on the moin channel/list/wiki.
participants (2)
-
Malthe Borch -
Simon Michael