# HG changeset patch # User Marcin Kuzminski # Date 1296165676 -3600 # Node ID 5da1286ddd28400db6ff19f1751d7c7ab39c220e # Parent 84bb5b8b498d8a123be96239172589aeef4d6e32 #107 added single line highlight diff -r 84bb5b8b498d -r 5da1286ddd28 rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py Thu Jan 27 21:45:30 2011 +0100 +++ b/rhodecode/lib/helpers.py Thu Jan 27 23:01:16 2011 +0100 @@ -224,7 +224,7 @@ def _wrap_code(self, source): for cnt, it in enumerate(source): i, t = it - t = '
%s
' % (cnt + 1, t) + t = '
%s
' % (cnt + 1, t) yield i, t def pygmentize(filenode, **kwargs): """pygmentize function using pygments diff -r 84bb5b8b498d -r 5da1286ddd28 rhodecode/public/css/pygments.css --- a/rhodecode/public/css/pygments.css Thu Jan 27 21:45:30 2011 +0100 +++ b/rhodecode/public/css/pygments.css Thu Jan 27 23:01:16 2011 +0100 @@ -53,6 +53,10 @@ padding: 5px; margin: 0; } +.code-highlight pre div:target { + background-color: #FFFFBE !important; +} + .linenos a { text-decoration: none; } .code { display: block; } diff -r 84bb5b8b498d -r 5da1286ddd28 rhodecode/templates/files/files_source.html --- a/rhodecode/templates/files/files_source.html Thu Jan 27 21:45:30 2011 +0100 +++ b/rhodecode/templates/files/files_source.html Thu Jan 27 23:01:16 2011 +0100 @@ -37,7 +37,7 @@
% if c.files_list.size < c.cut_off_limit: - ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")} + ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")} %else: ${_('File is to big to display')} ${h.link_to(_('show as raw'), h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}