Exemplo n.º 1
0
    def image(self, src, title, text):
        src = mistune.escape_link(src)
        text = mistune.escape(text, quote=True)

        if title:
            title = mistune.escape(title, quote=True)
            ecml = """\
                <figure align="center">
                    <caption>%s</caption>
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (title, src)
        else:
            ecml = """\
                <figure align="center">
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (src, )
        #end if

        return ecml
Exemplo n.º 2
0
    def image(self, src, title, text):
        src  = mistune.escape_link(src)
        text = mistune.escape(text, quote=True)

        if title:
            title = mistune.escape(title, quote=True)
            ecml = """\
                <figure align="center">
                    <caption>%s</caption>
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (title, src)
        else:
            ecml = """\
                <figure align="center">
                    <img src="%s" print-width="100%%" screen-width="800px"/>
                </figure>
            """ % (src,)
        #end if

        return ecml
Exemplo n.º 3
0
 def link(self, link, title, text):
     link = mistune.escape_link(link)
     return '<link url="%s">%s</a>' % (link, text)
Exemplo n.º 4
0
 def link(self, link, title, text):
     link = mistune.escape_link(link)
     return '<link url="%s">%s</a>' % (link, text)