Skip to content

Commit ad5e0cd

Browse files
committed
allow hyphen in node name (fixes #5)
1 parent 1c9021e commit ad5e0cd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dbushell/xml-streamify",
3-
"version": "0.6.2",
3+
"version": "0.7.0",
44
"exports": {
55
".": "./mod.ts",
66
"./node": "./src/node.ts",

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@dbushell/xml-streamify",
3-
"version": "0.6.2",
3+
"version": "0.7.0",
44
"repository": {
55
"type": "git",
66
"url": "git+https://github.com/dbushell/xml-streamify.git"

src/parse.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ export async function* parse(
7373
}
7474
// Handle elements
7575
if (type === NodeType.ELEMENT) {
76-
const name = value.match(/<\/?([\w:.]+)/)![1];
76+
const name = value.match(/<\/?([\w:.-]+)/)![1];
7777
// Handle self-closing element
7878
if (value.endsWith('/>')) {
7979
const newNode = new Node(name, node, value);

0 commit comments

Comments
 (0)