Skip to content

Commit e18551c

Browse files
committed
Merge branch 'source_locations' of github.com:devongovett/posthtml-parser into source_locations
2 parents d61007b + d560a26 commit e18551c

5 files changed

Lines changed: 20 additions & 7 deletions

File tree

.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: [12, 14]
18+
node: [12, 14, 16]
1919
os: [ubuntu-latest]
2020

2121
steps:

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
## <small>0.8.1 (2021-05-05)</small>
2+
3+
* ci: add node 16 ([58c6740](https://github.com/posthtml/posthtml-parser/commit/58c6740))
4+
* perf: types content ([e9f59a2](https://github.com/posthtml/posthtml-parser/commit/e9f59a2))
5+
* perf: types content ([87b2a82](https://github.com/posthtml/posthtml-parser/commit/87b2a82))
6+
7+
8+
19
## 0.8.0 (2021-04-16)
210

11+
* 0.8.0 ([9676edd](https://github.com/posthtml/posthtml-parser/commit/9676edd))
312
* ci: drop support for node 10 (found not to be working) ([585d552](https://github.com/posthtml/posthtml-parser/commit/585d552))
413
* build: add prepare script ([1dc46fc](https://github.com/posthtml/posthtml-parser/commit/1dc46fc))
514

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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "posthtml-parser",
3-
"version": "0.8.0",
3+
"version": "0.8.1",
44
"description": "Parse HTML/XML to PostHTMLTree",
55
"license": "MIT",
66
"repository": "posthtml/posthtml-parser",

types/index.d.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,20 @@ export type Options = {
1515
sourceLocations?: boolean;
1616
} & ParserOptions;
1717

18-
export type Node = NodeText | NodeTag;
18+
export type Tag = string | boolean;
19+
export type Attributes = Record<string, string>;
20+
export type Content = NodeText | Node[];
21+
1922
export type NodeText = string;
2023
export type NodeTag = {
21-
tag?: string | boolean;
24+
tag?: Tag;
2225
attrs?: Attributes;
23-
content?: Node[];
26+
content?: Content;
2427
location?: SourceLocation;
2528
};
2629

27-
export type Attributes = Record<string, string>;
30+
export type Node = NodeText | NodeTag;
31+
2832
export type SourceLocation = {
2933
start: Position;
3034
end: Position;

0 commit comments

Comments
 (0)