From 80da71148a4b0607b2ba026588f42554c73e9a25 Mon Sep 17 00:00:00 2001 From: Alex Yatskov Date: Sat, 16 Apr 2016 11:24:03 -0700 Subject: [PATCH] Adding better rule output --- ext/bg/js/templates.js | 15 ++++++++------- util/tmpl/term.html | 6 +++++- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js index a8889fb7..4e0c9eef 100644 --- a/ext/bg/js/templates.js +++ b/ext/bg/js/templates.js @@ -34,21 +34,22 @@ templates['term.html'] = template({"1":function(container,depth0,helpers,partial + container.escapeExpression(((helper = (helper = helpers.expression || (depth0 != null ? depth0.expression : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(depth0 != null ? depth0 : {},{"name":"expression","hash":{},"data":data}) : helper))) + "\n"; },"5":function(container,depth0,helpers,partials,data) { - var stack1; + var stack1, helper, alias1=depth0 != null ? depth0 : {}; return "
\n" - + ((stack1 = helpers.each.call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "
\n"; + + ((stack1 = helpers.each.call(alias1,(depth0 != null ? depth0.rules : depth0),{"name":"each","hash":{},"fn":container.program(6, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") + + " »\n " + + container.escapeExpression(((helper = (helper = helpers.source || (depth0 != null ? depth0.source : depth0)) != null ? helper : helpers.helperMissing),(typeof helper === "function" ? helper.call(alias1,{"name":"source","hash":{},"data":data}) : helper))) + + "\n\n"; },"6":function(container,depth0,helpers,partials,data) { var stack1; return " " + container.escapeExpression(container.lambda(depth0, depth0)) - + "\n " - + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : "") - + "\n"; + + "\n" + + ((stack1 = helpers.unless.call(depth0 != null ? depth0 : {},(data && data.last),{"name":"unless","hash":{},"fn":container.program(7, data, 0),"inverse":container.noop,"data":data})) != null ? stack1 : ""); },"7":function(container,depth0,helpers,partials,data) { - return " « "; + return " »\n"; },"9":function(container,depth0,helpers,partials,data) { return "
  • " + container.escapeExpression(container.lambda(depth0, depth0)) diff --git a/util/tmpl/term.html b/util/tmpl/term.html index 62183e31..1aa12d9e 100644 --- a/util/tmpl/term.html +++ b/util/tmpl/term.html @@ -8,8 +8,12 @@
    {{#each rules}} {{.}} - {{#unless @last}} « {{/unless}} + {{#unless @last}} + » + {{/unless}} {{/each}} + » + {{source}}
    {{/if}}