##// END OF EJS Templates
#107 added single line highlight
marcink -
r965:5da1286d beta
parent child Browse files
Show More
@@ -224,7 +224,7 b' class CodeHtmlFormatter(HtmlFormatter):'
224 224 def _wrap_code(self, source):
225 225 for cnt, it in enumerate(source):
226 226 i, t = it
227 t = '<div id="#S-%s">%s</div>' % (cnt + 1, t)
227 t = '<div id="L-%s">%s</div>' % (cnt + 1, t)
228 228 yield i, t
229 229 def pygmentize(filenode, **kwargs):
230 230 """pygmentize function using pygments
@@ -53,6 +53,10 b' div.annotatediv{'
53 53 padding: 5px;
54 54 margin: 0;
55 55 }
56 .code-highlight pre div:target {
57 background-color: #FFFFBE !important;
58 }
59
56 60 .linenos a { text-decoration: none; }
57 61
58 62 .code { display: block; }
@@ -37,7 +37,7 b''
37 37 </div>
38 38 <div class="code-body">
39 39 % if c.files_list.size < c.cut_off_limit:
40 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='S',cssclass="code-highlight")}
40 ${h.pygmentize(c.files_list,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
41 41 %else:
42 42 ${_('File is to big to display')} ${h.link_to(_('show as raw'),
43 43 h.url('files_raw_home',repo_name=c.repo_name,revision=c.changeset.raw_id,f_path=c.f_path))}
General Comments 0
You need to be logged in to leave comments. Login now