def render(self, context): text = self.nodelist.render(context) if self.title: text = "### %s\n\n%s" % (self.title, text) text = markdown(text) link_anchor = ANCHOR_PATTERN % self.anchor text = bleach.linkify(text, callbacks=self.CALLBACKS, skip_pre=True) text = link_anchor + text + TOP_LINK return text
def render(self, context): text = self.nodelist.render(context) if self.title: text = "### %s\n\n%s" % (self.title, text) #text = markdown(text) text = markdown(text) link_anchor = ANCHOR_PATTERN % self.anchor text = bleach.linkify(text, callbacks=self.CALLBACKS, skip_pre=True) text = link_anchor + text + TOP_LINK return text
def simplecode(context, pattern): text = load(context=context, pattern=pattern) html = markdown("```\n{}\n```").format(text) return html
def toggle(context, pattern, id=1, title='Show'): text = read_file(context=context, pattern=pattern) html = markdown(text) return dict(html=html, id=id, title=title)