~cbehrens/nova/lp844160-build-works-with-zones

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from twisted.lore import default
from myhtml import spitters

class MyProcessingFunctionFactory(default.ProcessingFunctionFactory):
    latexSpitters={None: spitters.MyLatexSpitter,
                   }

    # redefine getLintChecker to validate our classes
    def getLintChecker(self):
        # use the default checker from parent
        checker = lint.getDefaultChecker()
        checker.allowedClasses = checker.allowedClasses.copy()
        oldSpan = checker.allowedClasses['span']
        checkfunc=lambda cl: oldSpan(cl) or cl in ['marketinglie',
                                                   'productname']
        checker.allowedClasses['span'] = checkfunc
        return checker

# initialize the global variable factory with an instance of your new factory
factory=MyProcessingFunctionFactory()