コード例 #1
0
 def _format(self, format_name, caller=None):
     body = caller()
     text = format_text(self.environment.app,
                        format_name,
                        Markup(body.rstrip()).unescape(),
                        exact_format=True)
     return text
コード例 #2
0
ファイル: jinjaengine.py プロジェクト: ronCYA/PieCrust2
 def _format(self, format_name, caller=None):
     body = caller()
     text = format_text(self.environment.app,
                        format_name,
                        Markup(body.rstrip()).unescape(),
                        exact_format=True)
     return text
コード例 #3
0
ファイル: _inukshukext.py プロジェクト: zaxebo1/PieCrust2
    def render(self, ctx, data, out):
        with io.StringIO() as tmp:
            inner_out = tmp.write
            for c in self.children:
                c.render(ctx, data, inner_out)

            text = format_text(ctx.engine.piecrust_app, self.format,
                               tmp.getvalue(), exact_format=True)
            out(text)
コード例 #4
0
 def _formatWith(self, value, format_name):
     return format_text(self.app, format_name, value)
コード例 #5
0
 def _formatWith(self, value, format_name):
     return format_text(self.app, format_name, value)