Exemplo n.º 1
0
 def process(self):
     args = dict(self.getAttributeValues())
     lang = args.pop("language", None)
     args["text"] = unescape(args["text"])
     if lang is not None:
         args["text"] = pygments2xpre(args["text"], lang.lower())
     if "style" not in args:
         args["style"] = attr._getStyle(self, "Code")
     self.parent.flow.append(self.klass(**args))
Exemplo n.º 2
0
 def process(self):
     args = dict(self.getAttributeValues())
     lang = args.pop('language', None)
     args['text'] = unescape(args['text'])
     if lang is not None:
         args['text'] = pygments2xpre.pygments2xpre(args['text'],
                                                    lang.lower())
     if 'style' not in args:
         args['style'] = attr._getStyle(self, 'Code')
     self.parent.flow.append(self.klass(**args))
Exemplo n.º 3
0
 def process(self):
     args = dict(self.getAttributeValues())
     lang = args.pop('language', None)
     args['text'] = unescape(args['text'])
     if lang is not None:
         args['text'] = pygments2xpre.pygments2xpre(
             args['text'], lang.lower())
     if 'style' not in args:
         args['style'] = attr._getStyle(self, 'Code')
     self.parent.flow.append(self.klass(**args))
Exemplo n.º 4
0
 def findSpanStyle(self, style):
     from z3c.rml import attr
     return attr._getStyle(self.manager, style)
Exemplo n.º 5
0
 def process(self):
     args = dict(self.getAttributeValues(ignore=self.styleAttributes))
     if 'style' not in args:
         args['style'] = attr._getStyle(self, self.defaultStyle)
     args['style'] = self.processStyle(args['style'])
     self.parent.flow.append(self.klass(**args))
Exemplo n.º 6
0
 def process(self):
     args = dict(self.getAttributeValues(ignore=self.styleAttributes))
     if "style" not in args:
         args["style"] = attr._getStyle(self, self.defaultStyle)
     args["style"] = self.processStyle(args["style"])
     self.parent.flow.append(self.klass(**args))
Exemplo n.º 7
0
 def findSpanStyle(self, style):
     from z3c.rml import attr
     return attr._getStyle(self.manager, style)