diff --git a/rhodecode/lib/helpers.py b/rhodecode/lib/helpers.py
--- a/rhodecode/lib/helpers.py
+++ b/rhodecode/lib/helpers.py
@@ -64,20 +64,20 @@ def recursive_replace(str, replace=' '):
return str
else:
str = str.replace(replace * 2, replace)
- return recursive_replace(str, replace)
+ return recursive_replace(str, replace)
class _ToolTip(object):
-
+
def __call__(self, tooltip_title, trim_at=50):
"""
Special function just to wrap our text into nice formatted autowrapped
text
:param tooltip_title:
"""
-
+
return wrap_paragraphs(escape(tooltip_title), trim_at)\
.replace('\n', '
')
-
+
def activate(self):
"""
Adds tooltip mechanism to the given Html all tooltips have to have
@@ -85,7 +85,7 @@ class _ToolTip(object):
Then a tooltip will be generated based on that
All with yui js tooltip
"""
-
+
js = '''
YAHOO.util.Event.onDOMReady(function(){
function toolTipsId(){
@@ -190,25 +190,25 @@ class _ToolTip(object):
});
});
- '''
+ '''
return literal(js)
tooltip = _ToolTip()
class _FilesBreadCrumbs(object):
-
+
def __call__(self, repo_name, rev, paths):
url_l = [link_to(repo_name, url('files_home',
repo_name=repo_name,
revision=rev, f_path=''))]
paths_l = paths.split('/')
-
- for cnt, p in enumerate(paths_l, 1):
+
+ for cnt, p in enumerate(paths_l):
if p != '':
url_l.append(link_to(p, url('files_home',
repo_name=repo_name,
revision=rev,
- f_path='/'.join(paths_l[:cnt]))))
+ f_path='/'.join(paths_l[:cnt + 1]))))
return literal('/'.join(url_l))
@@ -219,9 +219,9 @@ class CodeHtmlFormatter(HtmlFormatter):
return self._wrap_div(self._wrap_pre(self._wrap_code(source)))
def _wrap_code(self, source):
- for cnt, it in enumerate(source, 1):
+ for cnt, it in enumerate(source):
i, t = it
- t = '