% if not dirname.raw:
% reltree = './'
% else:
% reltree = '../' * (len(dirname.split('/')) - 1)
% end
% relroot = reltree + '../' * (len(branch.split('/')) - 1)
git » {{repo.name}} »
{{branch}} » {{dirname.raw}}{{fname.raw}}
[{{branch}}] /
% base = smstr(reltree)
% for c in dirname.split('/'):
% if not c.raw:
% continue
% end
{{c.raw}} /
% base += c + '/'
% end
{{!fname.html}}
% if len(blob.raw_content) == 0:
% elif can_embed_image(repo, fname.raw):
{{!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.raw):
{{!markdown_blob(blob.utf8_content)}}
% elif can_colorize(blob.utf8_content):
{{!colorize_blob(fname.raw, blob.utf8_content)}}
% else:
{{blob.utf8_content}}
% end