Skip to content

Commit 771b9b9

Browse files
committed
style: fix code style
1 parent 9c0dc5f commit 771b9b9

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

src/render/operator.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { isComparable } from '../drop/comparable'
22
import { Context } from '../context'
33
import { isFunction, toValue } from '../util'
44
import { isFalsy, isTruthy } from '../render/boolean'
5-
import { isArray } from '../util/underscore';
5+
import { isArray } from '../util/underscore'
66

77
export type UnaryOperatorHandler = (operand: any, ctx: Context) => boolean;
88
export type BinaryOperatorHandler = (lhs: any, rhs: any, ctx: Context) => boolean;
@@ -42,7 +42,7 @@ export const defaultOperators: Operators = {
4242
'or': (l: any, r: any, ctx: Context) => isTruthy(toValue(l), ctx) || isTruthy(toValue(r), ctx)
4343
}
4444

45-
function equal(lhs: any, rhs: any): boolean {
45+
function equal (lhs: any, rhs: any): boolean {
4646
if (isComparable(lhs)) return lhs.equals(rhs)
4747
if (isComparable(rhs)) return rhs.equals(lhs)
4848
lhs = toValue(lhs)
@@ -53,7 +53,7 @@ function equal(lhs: any, rhs: any): boolean {
5353
return lhs === rhs
5454
}
5555

56-
function arrayEqual(lhs: any[], rhs: any[]): boolean {
56+
function arrayEqual (lhs: any[], rhs: any[]): boolean {
5757
if (lhs.length !== rhs.length) return false
5858
return !lhs.some((value, i) => !equal(value, rhs[i]))
5959
}

test/e2e/issues.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,7 @@ describe('Issues', function () {
390390
const html = await liquid.parseAndRender(tpl, ctx)
391391
expect(html.trim()).to.equal('<a href="https://example.com">Lot more code here</a>')
392392
})
393-
it('#70 strip multiline content of <style>', async() => {
393+
it('#70 strip multiline content of <style>', async () => {
394394
const str = `
395395
<style type="text/css">
396396
.test-one-line {display: none;}
@@ -400,13 +400,13 @@ describe('Issues', function () {
400400
const html = await engine.parseAndRender(template, { str })
401401
expect(html).to.match(/^\s*$/)
402402
})
403-
it('#589 Arrays should compare values', async() => {
403+
it('#589 Arrays should compare values', async () => {
404404
const engine = new Liquid()
405405
const template = `
406406
{% assign people1 = "alice, bob, carol" | split: ", " -%}
407407
{% assign people2 = "alice, bob, carol" | split: ", " -%}
408408
{% if people1 == people2 %}true{%else%}false{% endif %}
409-
`;
409+
`
410410
const html = await engine.parseAndRender(template)
411411
expect(html).to.contain('true')
412412
})

test/integration/filters/html.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ import { Liquid } from '../../../src/liquid'
44

55
describe('filters/html', function () {
66
let liquid: Liquid
7-
beforeEach(() => liquid = new Liquid())
7+
beforeEach(() => {
8+
liquid = new Liquid()
9+
})
810
describe('escape', function () {
911
it('should escape \' and &', function () {
1012
return test('{{ "Have you read \'James & the Giant Peach\'?" | escape }}',

test/unit/render/expression.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ describe('Expression', function () {
5757
const ctx = new Context({
5858
arr1: [1, 2],
5959
arr2: [1, 2],
60-
arr3: [1, 2, 3],
60+
arr3: [1, 2, 3]
6161
})
6262
expect(await toPromise(create('arr1==arr2').evaluate(ctx, false))).to.equal(true)
6363
expect(await toPromise(create('arr1==arr3').evaluate(ctx, false))).to.equal(false)

0 commit comments

Comments
 (0)