% if not dirname.raw:
% reltree = './'
% else:
% reltree = '../' * (len(dirname.split('/')) - 1)
% end
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
git » {{repo.name}} »
{{branch}} » {{dirname.unicode}}{{fname.unicode}}
[{{branch}}] /
% base = smstr(reltree)
% for c in dirname.split('/'):
% if not c.raw:
% continue
% end
{{c.unicode}} /
% base += c + '/'
% end
{{!fname.html}}
% if len(blob.raw_content) == 0:
% elif can_embed_image(repo, fname.unicode):
{{!embed_image_blob(fname.raw, blob.raw_content)}}
% elif is_binary(blob.raw_content):
binary — {{'{:,}'.format(len(blob.raw_content))}} bytes
|
% lim = 256
% for offset, hex1, hex2, text in hexdump(blob.raw_content[:lim]):
{{offset}} |
{{hex1}} |
{{hex2}} |
{{text}} |
% end
% if lim < len(blob.raw_content):
|
… |
… |
… |
% end
% elif can_markdown(repo, fname.unicode):
{{!markdown_blob(blob.utf8_content)}}
% elif can_colorize(blob.utf8_content):
{{!colorize_blob(fname.unicode, blob.utf8_content)}}
% else:
{{blob.utf8_content}}
% end