We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0d27d0e commit af60497Copy full SHA for af60497
deno.json
@@ -1,6 +1,6 @@
1
{
2
"name": "@dbushell/xml-streamify",
3
- "version": "0.3.0",
+ "version": "0.4.0",
4
"exports": {
5
".": "./mod.ts",
6
"./node": "./src/node.ts",
src/node.ts
@@ -41,10 +41,10 @@ export class Node {
41
// Setup and parse attributes on first access
42
this.#attr = {};
43
if (this.raw) {
44
- const regex = /([\w:.-]+)\s*=\s*["'](.*?)["']/g;
+ const regex = /([\w:.-]+)\s*=\s*(["'])(.*?)\2/g;
45
let match: RegExpExecArray | null;
46
while ((match = regex.exec(this.raw)) !== null) {
47
- this.#attr[match[1]] = match[2];
+ this.#attr[match[1]] = match[3];
48
}
49
50
return this.#attr;
0 commit comments