Add categories and tags to the replacement mechanism.

This commit is contained in:
Alexis Métaireau 2013-08-17 17:36:13 +02:00
commit e2ca6d7608
3 changed files with 32 additions and 0 deletions

View file

@ -216,6 +216,10 @@ class Content(object):
else:
logger.warning("Unable to find {fn}, skipping url"
" replacement".format(fn=value))
elif what == 'category':
origin = Category(value, self.settings).url
elif what == 'tag':
origin = Tag(value, self.settings).url
return ''.join((m.group('markup'), m.group('quote'), origin,
m.group('quote')))