Skip to content

Commit

Permalink
Merge branch 'source_locations' of github.com:devongovett/posthtml-pa…
Browse files Browse the repository at this point in the history
…rser into source_locations
  • Loading branch information
devongovett committed May 8, 2021
2 parents d61007b + d560a26 commit e18551c
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 7 deletions.
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: [12, 14]
node: [12, 14, 16]
os: [ubuntu-latest]

steps:
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
## <small>0.8.1 (2021-05-05)</small>

* ci: add node 16 ([58c6740](https://github.com/posthtml/posthtml-parser/commit/58c6740))
* perf: types content ([e9f59a2](https://github.com/posthtml/posthtml-parser/commit/e9f59a2))
* perf: types content ([87b2a82](https://github.com/posthtml/posthtml-parser/commit/87b2a82))



## 0.8.0 (2021-04-16)

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

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.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "posthtml-parser",
"version": "0.8.0",
"version": "0.8.1",
"description": "Parse HTML/XML to PostHTMLTree",
"license": "MIT",
"repository": "posthtml/posthtml-parser",
Expand Down
12 changes: 8 additions & 4 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ export type Options = {
sourceLocations?: boolean;
} & ParserOptions;

export type Node = NodeText | NodeTag;
export type Tag = string | boolean;
export type Attributes = Record<string, string>;
export type Content = NodeText | Node[];

export type NodeText = string;
export type NodeTag = {
tag?: string | boolean;
tag?: Tag;
attrs?: Attributes;
content?: Node[];
content?: Content;
location?: SourceLocation;
};

export type Attributes = Record<string, string>;
export type Node = NodeText | NodeTag;

export type SourceLocation = {
start: Position;
end: Position;
Expand Down

0 comments on commit e18551c

Please sign in to comment.