aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSlava Bacherikov <slava@bacher09.org>2012-08-13 21:06:04 +0300
committerSlava Bacherikov <slava@bacher09.org>2012-08-13 21:06:04 +0300
commit21b8d78455479c3419e4535e93b0fabfa840fdee (patch)
treec611d4c10cffec73618d0543dea84f31cd72d20d
parentAdd commands for some utils (diff)
downloadgentoo-packages-21b8d78455479c3419e4535e93b0fabfa840fdee.tar.gz
gentoo-packages-21b8d78455479c3419e4535e93b0fabfa840fdee.tar.bz2
gentoo-packages-21b8d78455479c3419e4535e93b0fabfa840fdee.zip
Add cia.vc link to changelog
-rw-r--r--gpackages/libs/package_info/generic_metadata/changelog_highlight.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/gpackages/libs/package_info/generic_metadata/changelog_highlight.py b/gpackages/libs/package_info/generic_metadata/changelog_highlight.py
index 5b2b503..9ee13f1 100644
--- a/gpackages/libs/package_info/generic_metadata/changelog_highlight.py
+++ b/gpackages/libs/package_info/generic_metadata/changelog_highlight.py
@@ -6,6 +6,7 @@ from pygments.token import *
from pygments import highlight
import re
from collections import deque
+from ..utils import ciavc_link
DATE_RE = r'\d\d? [A-Z][a-z]{2} \d{4}'
EMAIL_RE = r'[\w\.\-\+]+@(?:[\w\-]+\.)+\w+'
@@ -167,7 +168,12 @@ class ChangelogHtmlFormater(HtmlFormatter):
if num_m is not None:
num = num_m.group()
link = bugs_url_template.format(num)
- value = '<a href="{1}" class="defcolor">{0}</a>'.format(value, link)
+ value = '<a href="{1}" class="defcolor">{0}</a>'. \
+ format(value, link)
+ elif token == Email:
+ name, domain = value.split('@')
+ value = '<a href="{1}" class="defcolor">{0}</a>'. \
+ format(name, ciavc_link(name))
return value
class ChangelogStyle(Style):