Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

        @contextfilter
def wiki_link(ctx, content):
    global _Post
    from liquidluck.writers.base import permalink

    def link_post(m):
        if not _Post:
            for item in g.public_posts:
                _Post[item.title] = item

        text = m.group(1)
        if '|' in text:
            title, content = text.split('|')
        else:
            title = content = text
        if title in _Post:
            item = _Post[title]
            link = permalink(ctx, item)
            return '%s' % (link, content)
        return '%s' % text

    pattern = re.compile(r'\[\[([^\]]+)\]\]', re.M)
    content = pattern.sub(link_post, content)
    return content
        


src/l/i/liquidluck-HEAD/liquidluck/writers/base.py   liquidluck(Download)
# liquidluck settings
from liquidluck.options import g
from liquidluck.filters import xmldatetime, feed_updated, wiki_link
from liquidluck.filters import content_url, tag_url, year_url, static_url
 

src/l/i/liquidluck-3.8.1/liquidluck/writers/base.py   liquidluck(Download)
# liquidluck settings
from liquidluck.options import g
from liquidluck.filters import xmldatetime, feed_updated, wiki_link
from liquidluck.filters import content_url, tag_url, year_url, static_url