summaryrefslogtreecommitdiff
path: root/ext/js/templates/sandbox
diff options
context:
space:
mode:
Diffstat (limited to 'ext/js/templates/sandbox')
-rw-r--r--ext/js/templates/sandbox/anki-template-renderer.js6
-rw-r--r--ext/js/templates/sandbox/template-renderer-media-provider.js2
2 files changed, 5 insertions, 3 deletions
diff --git a/ext/js/templates/sandbox/anki-template-renderer.js b/ext/js/templates/sandbox/anki-template-renderer.js
index dbf395e9..857922bf 100644
--- a/ext/js/templates/sandbox/anki-template-renderer.js
+++ b/ext/js/templates/sandbox/anki-template-renderer.js
@@ -74,6 +74,7 @@ export class AnkiTemplateRenderer {
* Prepares the data that is necessary before the template renderer can be safely used.
*/
async prepare() {
+ /* eslint-disable no-multi-spaces */
this._templateRenderer.registerHelpers([
['dumpObject', this._dumpObject.bind(this)],
['furigana', this._furigana.bind(this)],
@@ -103,6 +104,7 @@ export class AnkiTemplateRenderer {
['hiragana', this._hiragana.bind(this)],
['katakana', this._katakana.bind(this)]
]);
+ /* eslint-enable no-multi-spaces */
this._templateRenderer.registerDataType('ankiNote', {
modifier: ({marker, commonData}) => this._ankiNoteDataCreator.create(marker, commonData),
composeData: ({marker}, commonData) => ({marker, commonData})
@@ -392,9 +394,9 @@ export class AnkiTemplateRenderer {
case '!=': return operand1 != operand2; // eslint-disable-line eqeqeq
case '===': return operand1 === operand2;
case '!==': return operand1 !== operand2;
- case '<': return operand1 < operand2;
+ case '<': return operand1 < operand2;
case '<=': return operand1 <= operand2;
- case '>': return operand1 > operand2;
+ case '>': return operand1 > operand2;
case '>=': return operand1 >= operand2;
case '<<': return operand1 << operand2;
case '>>': return operand1 >> operand2;
diff --git a/ext/js/templates/sandbox/template-renderer-media-provider.js b/ext/js/templates/sandbox/template-renderer-media-provider.js
index d8a0a16d..0a7f5d9b 100644
--- a/ext/js/templates/sandbox/template-renderer-media-provider.js
+++ b/ext/js/templates/sandbox/template-renderer-media-provider.js
@@ -79,7 +79,7 @@ export class TemplateRendererMediaProvider {
*/
_getFormattedValue(data, namedArgs) {
let {value} = data;
- const {escape=true} = namedArgs;
+ const {escape = true} = namedArgs;
if (escape) {
value = Handlebars.Utils.escapeExpression(value);
}