From da2043fb474f00c90110f3527bde30b707bc930d Mon Sep 17 00:00:00 2001 From: Norbert Renner Date: Sat, 12 Jun 2021 11:11:08 +0200 Subject: [PATCH] Break after self-closing trkpt without ele (beeline) --- js/format/Xml.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/js/format/Xml.js b/js/format/Xml.js index 93efdcd..d52a147 100644 --- a/js/format/Xml.js +++ b/js/format/Xml.js @@ -25,7 +25,11 @@ BR.Xml = { } } else { if (singleLineTagList.includes(tag)) { - singleLineTag = tag; + const closeIndex = xml.indexOf('>', match.index + 1); + const selfClosing = xml.charAt(closeIndex - 1) === '/'; + if (!selfClosing) { + singleLineTag = tag; + } } let endIndex = match.index + 1; lines.push(xml.substring(startIndex, endIndex));