From a921dd35c0a502786cbfd76b421e46cd8b96cd61 Mon Sep 17 00:00:00 2001 From: Ulyanov-programmer Date: Thu, 17 Oct 2024 19:57:03 +0400 Subject: [PATCH] Added processing for new lines. --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 021fddf..fcede0e 100644 --- a/index.js +++ b/index.js @@ -91,7 +91,9 @@ function breakOut(child, after) { /* comment about the rule below /* .rule {} */ - if (parentRule.includes(prevNode.toString() + node.toString())) { + let regexp = new RegExp(`${prevNode.toString()} *\n *${node.toString()}`) + + if (parentRule.match(regexp)) { changeParent = false after.after(node).after(prevNode) }