in the Dumper class, there's a dump_children method that loops thru elements and recursively calls itself in a way that (I think) precludes adding elements via the plugin mechanism.

I've been trying to pull this out of the loop:

elif element.tag == 'h':
        level = int(element.attrib['level'])
                                if level < 1:   level = 1
                                elif level > 5: level = 5
                                tag = '='*(7 - level)
                                output.append(tag+' '+element.text+' '+tag)

On 2012-10-31 10:49, Jaap Karssenberg wrote:
On Wed, Oct 31, 2012 at 3:33 PM, Fred McDavid <f...@landmetrics.com> wrote:
I did a little work on a plugin to hilite code snippets but hit a wall with non-pluggable tags that I think is the same that would prevent such hidden
info.

I did a little hacking on the Dumper class in zim/formats/wiki.py to make
tags pluggable, but so far it's not much to look at.

Jaap, do you have any plans to make this possible? If not, would you mind
if I took a stab at it (while sometimes asking for help)?

I'm sorry, but a lost you at "non-pluggable tags". Afraid I don't have
clue what you mean by that.

As a general comment, if you are hacking on the parser and dumper
classes, please use the "pyzim-next" branch.

Regards,

Jaap

--
Fred McDavid
founder, LandMetrics
f...@landmetrics.com
540.300.5263

_______________________________________________
Mailing list: https://launchpad.net/~zim-wiki
Post to     : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp

Reply via email to