Skip to content

Commit

Permalink
add support for tags that separate attributes by new lines
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielJDufour committed Dec 6, 2022
1 parent a1f3d3f commit 080e0f8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion find-tag-by-name.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ function findTagByName(xml, tagName, options) {

if (debug) console.log("[xml-utils] starting findTagByName with", tagName, " and ", options);

const start = indexOfMatch(xml, `\<${tagName}[ \>\/]`, startIndex);
const start = indexOfMatch(xml, `\<${tagName}[ \n\>\/]`, startIndex);
if (debug) console.log("[xml-utils] start:", start);
if (start === -1) return undefined;

Expand Down

0 comments on commit 080e0f8

Please sign in to comment.