From 34ea9979abf1474eaaa581c2c32406c255c5f61c Mon Sep 17 00:00:00 2001
From: Alex Yatskov <alex@foosoft.net>
Date: Thu, 26 Jan 2017 20:22:52 -0800
Subject: wip

---
 ext/bg/js/templates.js | 2 +-
 ext/bg/js/util.js      | 5 +++--
 ext/bg/js/yomichan.js  | 3 +--
 3 files changed, 5 insertions(+), 5 deletions(-)

(limited to 'ext')

diff --git a/ext/bg/js/templates.js b/ext/bg/js/templates.js
index 416f118e..4ef66de8 100644
--- a/ext/bg/js/templates.js
+++ b/ext/bg/js/templates.js
@@ -145,7 +145,7 @@ templates['fields.html'] = template({"1":function(container,depth0,helpers,parti
     var stack1;
 
   return "<div style=\"text-align: left;\">\n"
-    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.grouped : depth0),{"name":"if","hash":{},"fn":container.program(36, data, 0),"inverse":container.program(42, data, 0),"data":data})) != null ? stack1 : "")
+    + ((stack1 = helpers["if"].call(depth0 != null ? depth0 : {},(depth0 != null ? depth0.group : depth0),{"name":"if","hash":{},"fn":container.program(36, data, 0),"inverse":container.program(42, data, 0),"data":data})) != null ? stack1 : "")
     + "</div>\n";
 },"36":function(container,depth0,helpers,partials,data) {
     var stack1;
diff --git a/ext/bg/js/util.js b/ext/bg/js/util.js
index 253fcd0f..108c88e7 100644
--- a/ext/bg/js/util.js
+++ b/ext/bg/js/util.js
@@ -201,7 +201,7 @@ function sortTags(tags) {
     });
 }
 
-function formatField(field, definition, mode, html) {
+function formatField(field, definition, mode, options) {
     const markers = [
         'audio',
         'character',
@@ -221,7 +221,8 @@ function formatField(field, definition, mode, html) {
         const data = {
             marker,
             definition,
-            html,
+            group: options.general.groupResults,
+            html: options.anki.htmlCards,
             modeTermKanji: mode === 'term_kanji',
             modeTermKana: mode === 'term_kana',
             modeKanji: mode === 'kanji'
diff --git a/ext/bg/js/yomichan.js b/ext/bg/js/yomichan.js
index 89608a5b..720c450a 100644
--- a/ext/bg/js/yomichan.js
+++ b/ext/bg/js/yomichan.js
@@ -146,11 +146,10 @@ class Yomichan {
                 fields[name],
                 definition,
                 mode,
-                this.options.anki.htmlCards
+                this.options
             );
         }
 
-        // console.log(note);
         return note;
     }
 
-- 
cgit v1.2.3