diff --git a/_test/html-ast-transform.spec.ts b/_test/html-ast-transform.spec.ts index 82163a0..8aaa448 100644 --- a/_test/html-ast-transform.spec.ts +++ b/_test/html-ast-transform.spec.ts @@ -2,7 +2,7 @@ import {expect} from "chai"; import "mocha"; import * as parse5 from "parse5"; -import {transform, getAttr, h, hasClass} from "../src"; +import {getAttr, h, hasClass, transform} from "../src"; describe("Html transform", function() { it("does nothing", function() { @@ -83,18 +83,18 @@ describe("Html transform", function() { }); it("whole document", function() { - const input = 'foo
foo
' + const input = "foo
foo
"; - const res = transform(input, {fragment: false}) - expect(res).to.equal(input) - }) + const res = transform(input, {fragment: false}); + expect(res).to.equal(input); + }); it("example 1", function() { const input = "

Some text

"; const output = "
Some text
"; const res = transform(input, { replaceTags: { - p: node => h("tr", [], [ + p: (node) => h("tr", [], [ h("td", node.attrs, node.childNodes) ]) } diff --git a/src/index.ts b/src/index.ts index 9b7548f..ebdf75d 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,4 +1,4 @@ -export {default as transform} from './html-ast-transform' +export {default as transform} from "./html-ast-transform"; export { getAttr, @@ -6,4 +6,4 @@ export { hasClass, withAttr, withClass -} from './helpers' +} from "./helpers";