Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
strategy:
fail-fast: false
matrix:
node: [10, 12, 14]
node: [12, 14, 16]
os: [ubuntu-latest]

steps:
Expand Down
35 changes: 29 additions & 6 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,44 @@
## <small>2.0.1 (2021-05-24)</small>

* ci: drop support old node ([810c46c](https://github.com/posthtml/posthtml-render/commit/810c46c))
* ci: lock ([3c894d6](https://github.com/posthtml/posthtml-render/commit/3c894d6))
* build: add prepare script, close #53 ([dbc9b47](https://github.com/posthtml/posthtml-render/commit/dbc9b47)), closes [#53](https://github.com/posthtml/posthtml-render/issues/53)
* test: for string template ([1047ce5](https://github.com/posthtml/posthtml-render/commit/1047ce5))
* docs: typo ([fae9dad](https://github.com/posthtml/posthtml-render/commit/fae9dad))



## <small>1.3.1 (2021-03-12)</small>

* 1.3.1 ([b59d962](https://github.com/posthtml/posthtml-render/commit/b59d962))
* build: update dep dev ([acf654b](https://github.com/posthtml/posthtml-render/commit/acf654b))
* test: Case sensitivity breaks empty elements, issue #49 ([041774c](https://github.com/posthtml/posthtml-render/commit/041774c)), closes [#49](https://github.com/posthtml/posthtml-render/issues/49)
* test: Case sensitivity breaks empty elements, issue #49 ([16b00d4](https://github.com/posthtml/posthtml-render/commit/16b00d4)), closes [#49](https://github.com/posthtml/posthtml-render/issues/49)
* test: remove undefined write ([9d22fff](https://github.com/posthtml/posthtml-render/commit/9d22fff))
* fix: case sensitivity breaks empty elements, close #49 ([1a87466](https://github.com/posthtml/posthtml-render/commit/1a87466)), closes [#49](https://github.com/posthtml/posthtml-render/issues/49)
* docs: remove unused badges ([903037c](https://github.com/posthtml/posthtml-render/commit/903037c))



## 2.0.0 (2021-05-07)

* docs: add quoteStyle option ([38b2b04](https://github.com/posthtml/posthtml-render/commit/38b2b04))
* 2.0.0 ([3c898d4](https://github.com/posthtml/posthtml-render/commit/3c898d4))
* docs: description node property closeAs, issue #48 ([5979fc9](https://github.com/posthtml/posthtml-render/commit/5979fc9)), closes [#48](https://github.com/posthtml/posthtml-render/issues/48)
* type: add node property closeAs, issue #48 ([00ec9b0](https://github.com/posthtml/posthtml-render/commit/00ec9b0)), closes [#48](https://github.com/posthtml/posthtml-render/issues/48)
* test: JSON strings in data attributes, #46 ([d0508e2](https://github.com/posthtml/posthtml-render/commit/d0508e2)), closes [#46](https://github.com/posthtml/posthtml-render/issues/46)
* test: node property closeAs, issue #48 ([f561e6b](https://github.com/posthtml/posthtml-render/commit/f561e6b)), closes [#48](https://github.com/posthtml/posthtml-render/issues/48)
* test: quoteStyle option ([18d31c0](https://github.com/posthtml/posthtml-render/commit/18d31c0))
* feat: add node property closeAs, close #48 ([6892ede](https://github.com/posthtml/posthtml-render/commit/6892ede)), closes [#48](https://github.com/posthtml/posthtml-render/issues/48)
* feat: add type definition for quoteStyle ([3ee8d58](https://github.com/posthtml/posthtml-render/commit/3ee8d58))
* feat: implement quoteStyle option ([903300f](https://github.com/posthtml/posthtml-render/commit/903300f))
* feat: JSON strings in data attributes, close #46 ([5539187](https://github.com/posthtml/posthtml-render/commit/5539187)), closes [#46](https://github.com/posthtml/posthtml-render/issues/46)
* merge: from master ([3ab5e82](https://github.com/posthtml/posthtml-render/commit/3ab5e82))
* refactor: migrate to typescript ([9eaaca4](https://github.com/posthtml/posthtml-render/commit/9eaaca4))



## <small>1.3.1 (2021-03-12)</small>

* 1.3.1 ([b59d962](https://github.com/posthtml/posthtml-render/commit/b59d962))
* Delete test.html ([0dea643](https://github.com/posthtml/posthtml-render/commit/0dea643))
* Update funding.yml ([86f2c9d](https://github.com/posthtml/posthtml-render/commit/86f2c9d))
* build: update dep dev ([acf654b](https://github.com/posthtml/posthtml-render/commit/acf654b))
* test: Case sensitivity breaks empty elements, issue #49 ([041774c](https://github.com/posthtml/posthtml-render/commit/041774c)), closes [#49](https://github.com/posthtml/posthtml-render/issues/49)
* test: Case sensitivity breaks empty elements, issue #49 ([16b00d4](https://github.com/posthtml/posthtml-render/commit/16b00d4)), closes [#49](https://github.com/posthtml/posthtml-render/issues/49)
Expand All @@ -24,8 +49,6 @@
* docs: remove unused badges ([903037c](https://github.com/posthtml/posthtml-render/commit/903037c))
* feat: add type definition for quoteStyle ([3ee8d58](https://github.com/posthtml/posthtml-render/commit/3ee8d58))
* feat: implement quoteStyle option ([903300f](https://github.com/posthtml/posthtml-render/commit/903300f))
* Delete test.html ([0dea643](https://github.com/posthtml/posthtml-render/commit/0dea643))
* Update funding.yml ([86f2c9d](https://github.com/posthtml/posthtml-render/commit/86f2c9d))



Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthtml-render",
"version": "2.0.0",
"version": "2.0.1",
"description": "Renders PostHTML Tree to HTML/XML",
"license": "MIT",
"repository": "posthtml/posthtml-render",
Expand All @@ -14,7 +14,8 @@
"build": "rm -rf dist && tsup src/*.ts --dts --minify",
"dev": "npm run build -- --watch",
"test": "xo && c8 ava",
"pretest": "clinton"
"pretest": "clinton",
"prepare": "npm run build"
},
"files": [
"dist"
Expand Down
9 changes: 9 additions & 0 deletions test/test-core.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import path from 'path';
import test from 'ava';
import render from '../src';
import {closingSingleTagOptionEnum, closingSingleTagTypeEnum, quoteStyleEnum} from '../types/index.d';
import parser from 'posthtml-parser';
import tree from './templates/parser';

const html = fs.readFileSync(path.resolve(__dirname, 'templates/render.html'), 'utf8');
Expand Down Expand Up @@ -187,6 +188,14 @@ test('{Tree} {Empty}', t => {
t.is(render(), '');
});

test.only('{Tree} {String Template}', t => {
const html = `
<div>String Template</div>
`;
const tree = parser(html);
t.is(html, render(tree));
});

test('{Tree} {HTML}', t => {
t.is(html, render(tree));
});
Expand Down