Skip to content

Commit 33318e2

Browse files
authored
Merge pull request #54 from posthtml/milestone-2.0.1
Milestone 2.0.1
2 parents 2b3e49c + feb426c commit 33318e2

File tree

5 files changed

+43
-10
lines changed

5 files changed

+43
-10
lines changed

.github/workflows/nodejs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
node: [10, 12, 14]
18+
node: [12, 14, 16]
1919
os: [ubuntu-latest]
2020

2121
steps:

changelog.md

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,44 @@
1+
## <small>2.0.1 (2021-05-24)</small>
2+
3+
* ci: drop support old node ([810c46c](https://github.com/posthtml/posthtml-render/commit/810c46c))
4+
* ci: lock ([3c894d6](https://github.com/posthtml/posthtml-render/commit/3c894d6))
5+
* 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)
6+
* test: for string template ([1047ce5](https://github.com/posthtml/posthtml-render/commit/1047ce5))
7+
* docs: typo ([fae9dad](https://github.com/posthtml/posthtml-render/commit/fae9dad))
8+
9+
10+
11+
## <small>1.3.1 (2021-03-12)</small>
12+
13+
* 1.3.1 ([b59d962](https://github.com/posthtml/posthtml-render/commit/b59d962))
14+
* build: update dep dev ([acf654b](https://github.com/posthtml/posthtml-render/commit/acf654b))
15+
* 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)
16+
* 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)
17+
* test: remove undefined write ([9d22fff](https://github.com/posthtml/posthtml-render/commit/9d22fff))
18+
* 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)
19+
* docs: remove unused badges ([903037c](https://github.com/posthtml/posthtml-render/commit/903037c))
20+
21+
22+
123
## 2.0.0 (2021-05-07)
224

3-
* docs: add quoteStyle option ([38b2b04](https://github.com/posthtml/posthtml-render/commit/38b2b04))
25+
* 2.0.0 ([3c898d4](https://github.com/posthtml/posthtml-render/commit/3c898d4))
426
* 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)
527
* 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)
628
* 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)
729
* 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)
8-
* test: quoteStyle option ([18d31c0](https://github.com/posthtml/posthtml-render/commit/18d31c0))
930
* 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)
10-
* feat: add type definition for quoteStyle ([3ee8d58](https://github.com/posthtml/posthtml-render/commit/3ee8d58))
11-
* feat: implement quoteStyle option ([903300f](https://github.com/posthtml/posthtml-render/commit/903300f))
1231
* 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)
1332
* merge: from master ([3ab5e82](https://github.com/posthtml/posthtml-render/commit/3ab5e82))
1433
* refactor: migrate to typescript ([9eaaca4](https://github.com/posthtml/posthtml-render/commit/9eaaca4))
34+
35+
36+
1537
## <small>1.3.1 (2021-03-12)</small>
1638

39+
* 1.3.1 ([b59d962](https://github.com/posthtml/posthtml-render/commit/b59d962))
40+
* Delete test.html ([0dea643](https://github.com/posthtml/posthtml-render/commit/0dea643))
41+
* Update funding.yml ([86f2c9d](https://github.com/posthtml/posthtml-render/commit/86f2c9d))
1742
* build: update dep dev ([acf654b](https://github.com/posthtml/posthtml-render/commit/acf654b))
1843
* 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)
1944
* 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)
@@ -24,8 +49,6 @@
2449
* docs: remove unused badges ([903037c](https://github.com/posthtml/posthtml-render/commit/903037c))
2550
* feat: add type definition for quoteStyle ([3ee8d58](https://github.com/posthtml/posthtml-render/commit/3ee8d58))
2651
* feat: implement quoteStyle option ([903300f](https://github.com/posthtml/posthtml-render/commit/903300f))
27-
* Delete test.html ([0dea643](https://github.com/posthtml/posthtml-render/commit/0dea643))
28-
* Update funding.yml ([86f2c9d](https://github.com/posthtml/posthtml-render/commit/86f2c9d))
2952

3053

3154

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "posthtml-render",
3-
"version": "2.0.0",
3+
"version": "2.0.1",
44
"description": "Renders PostHTML Tree to HTML/XML",
55
"license": "MIT",
66
"repository": "posthtml/posthtml-render",
@@ -14,7 +14,8 @@
1414
"build": "rm -rf dist && tsup src/*.ts --dts --minify",
1515
"dev": "npm run build -- --watch",
1616
"test": "xo && c8 ava",
17-
"pretest": "clinton"
17+
"pretest": "clinton",
18+
"prepare": "npm run build"
1819
},
1920
"files": [
2021
"dist"

test/test-core.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'path';
33
import test from 'ava';
44
import render from '../src';
55
import {closingSingleTagOptionEnum, closingSingleTagTypeEnum, quoteStyleEnum} from '../types/index.d';
6+
import parser from 'posthtml-parser';
67
import tree from './templates/parser';
78

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

191+
test.only('{Tree} {String Template}', t => {
192+
const html = `
193+
<div>String Template</div>
194+
`;
195+
const tree = parser(html);
196+
t.is(html, render(tree));
197+
});
198+
190199
test('{Tree} {HTML}', t => {
191200
t.is(html, render(tree));
192201
});

0 commit comments

Comments
 (0)