From 239a104c0bb71ea73a4d311c3ea5d60d00f47347 Mon Sep 17 00:00:00 2001 From: Rowanda <84088833+r0wanda@users.noreply.github.com> Date: Tue, 15 Oct 2024 15:28:54 -0700 Subject: [PATCH] Fix regexp --- src/Element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Element.ts b/src/Element.ts index ccff685..eb87243 100644 --- a/src/Element.ts +++ b/src/Element.ts @@ -920,7 +920,7 @@ export default class Element extends Node { if (!this.opts.tags) { const tags = []; // see: https://en.wikipedia.org/wiki/Newline#Representation - const t = s.split(/[\n\r]/); + const t = s.split(/\r\n|\n/); for (let i = 0; i < t.length; i++) { tags.push({ type: 'content',