diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py --- a/rhodecode/lib/helpers.py +++ b/rhodecode/lib/helpers.py @@ -224,7 +224,7 @@ class CodeHtmlFormatter(HtmlFormatter): 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 --git a/rhodecode/public/css/pygments.css b/rhodecode/public/css/pygments.css --- a/rhodecode/public/css/pygments.css +++ b/rhodecode/public/css/pygments.css @@ -53,6 +53,10 @@ div.annotatediv{ padding: 5px; margin: 0; } +.code-highlight pre div:target { + background-color: #FFFFBE !important; +} + .linenos a { text-decoration: none; } .code { display: block; } diff --git a/rhodecode/templates/files/files_source.html b/rhodecode/templates/files/files_source.html --- a/rhodecode/templates/files/files_source.html +++ b/rhodecode/templates/files/files_source.html @@ -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))}