Skip to content

Commit

Permalink
simplify more getCloseTag regex
Browse files Browse the repository at this point in the history
  • Loading branch information
caub committed May 20, 2018
1 parent ec76c21 commit 1193cef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/getCloseTag.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export default function getCloseTag(text: string, excludedTags: string[]): string {
const regex = /<(\/?[a-zA-Z][a-zA-Z0-9:\-_.]*)(?:\s+[^<>]?[^\s/<>=]+?)*?\s?>/g;
const regex = /<(\/?[a-zA-Z][a-zA-Z0-9:\-_.]*)(?:\s+[^<>]?[^\s/<>=]*)*\s?>/g;
const stack = [];
let result = null;
while ((result = regex.exec(text)) !== null) {
Expand Down

0 comments on commit 1193cef

Please sign in to comment.