templates: use string content when possible
This commit is contained in:
parent
515377a7d0
commit
bd0ca52ef4
4 changed files with 5 additions and 6 deletions
|
|
@ -97,7 +97,7 @@
|
|||
-->
|
||||
<div class="code-body textarea text-area editor">
|
||||
%if renderer:
|
||||
${h.render(gist_file.content, renderer=renderer)}
|
||||
${h.render(gist_file.str_content, renderer=renderer)}
|
||||
%else:
|
||||
${h.pygmentize(gist_file,linenos=True,anchorlinenos=True,lineanchors='L',cssclass="code-highlight")}
|
||||
%endif
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
##usage:
|
||||
## <%namespace name="diff_block" file="/changeset/diff_block.mako"/>
|
||||
## ${diff_block.diff_block_changeset_table(change)}
|
||||
|
|
@ -16,7 +15,7 @@
|
|||
<div id="${h.FID('',filenode_path)}_target" ></div>
|
||||
<div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
|
||||
<div class="code-body">
|
||||
<div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none"></div>
|
||||
<div class="full_f_path" path="${h.safe_str(filenode_path)}" style="display: none"></div>
|
||||
${diff|n}
|
||||
% if file_data["is_limited_diff"]:
|
||||
% if file_data["exceeds_limit"]:
|
||||
|
|
@ -37,7 +36,7 @@
|
|||
<div id="${h.FID('',filenode_path)}_target" ></div>
|
||||
<div id="${h.FID('',filenode_path)}" class="diffblock margined comm" >
|
||||
<div class="code-body">
|
||||
<div class="full_f_path" path="${h.safe_unicode(filenode_path)}" style="display: none;"></div>
|
||||
<div class="full_f_path" path="${h.safe_str(filenode_path)}" style="display: none;"></div>
|
||||
${diff|n}
|
||||
% if file_data["is_limited_diff"]:
|
||||
% if file_data["exceeds_limit"]:
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@
|
|||
|
||||
<div id="editor_container">
|
||||
<pre id="editor_pre"></pre>
|
||||
<textarea id="editor" name="content" >${h.escape(c.file.content)|n}</textarea>
|
||||
<textarea id="editor" name="content" >${h.escape(c.file.str_content)|n}</textarea>
|
||||
<div id="editor_preview" ></div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@
|
|||
'standard': h.route_path('repo_files',repo_name=c.repo_name,commit_id=c.commit.raw_id,f_path=c.f_path),
|
||||
}
|
||||
%>
|
||||
${h.render(c.file.content, renderer=c.renderer, relative_urls=relative_urls)}
|
||||
${h.render(c.file.str_content, renderer=c.renderer, relative_urls=relative_urls)}
|
||||
%else:
|
||||
<table class="cb codehilite">
|
||||
%if c.annotate:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue