Hack to work around handlebars wrongly indenting stuff
authorJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 11:52:42 +0000 (13:52 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Sat, 30 May 2015 11:52:42 +0000 (13:52 +0200)
site/index.html
site/js/gipeda.js

index 136399e..9ca7eb3 100644 (file)
@@ -148,7 +148,7 @@ html {
 </script>
 
 <script id="summary-icons"  type="text/x-handlebars-template">
-  <span title="{{summaryDesc}}">
+  <span title="{{id summaryDesc}}">
   <span>
    {{totalCount}}
    <span class="glyphicon glyphicon-stats"></span>
index 40ac0a4..8a9362b 100644 (file)
@@ -199,6 +199,10 @@ function shortRev(rev) {
   return rev.substr(0,7);
 }
 Handlebars.registerHelper('shortRev', shortRev);
+Handlebars.registerHelper('id', function (text) {
+    lines = text.split(/\r?\n/);
+    return new Handlebars.SafeString(lines.map(Handlebars.escapeExpression).join('&#10;'))
+});
 Handlebars.registerHelper('iso8601', function(timestamp) {
   if (!timestamp) { return '' };
   return new Date(timestamp*1000).toISOString();