From a907a83cf35a3ff8f917c571e698e5259aa075bd Mon Sep 17 00:00:00 2001 From: EvgeniyIgol Date: Tue, 10 Jun 2025 16:59:11 +0300 Subject: [PATCH] Fix style --- tests/word/custom-xml/custom-xml-common.js | 30 +--------------------- word/Editor/custom-xml/custom-xml.js | 2 +- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/tests/word/custom-xml/custom-xml-common.js b/tests/word/custom-xml/custom-xml-common.js index 1679ed9342..72d48d75a9 100644 --- a/tests/word/custom-xml/custom-xml-common.js +++ b/tests/word/custom-xml/custom-xml-common.js @@ -181,35 +181,7 @@ const oCustomXMLs = { 'picture': "\n" + oCustomXMLData.onePicture + "\"", 'notValidData': oCustomXMLData.onePicture, 'checkboxTrueAnotherXML': "\n" + oCustomXMLData.checkboxTrue + "", - 'xPath': ` - - - Great Expectations - Charles Dickens - 1861 - 15.00 - - - Moby-Dick - Herman Melville - 1851 - 18.50 - - - Crime and Punishment - Fyodor Dostoevsky - 1866 - 20.00 - - - - - - - - One - - 0.00 - -` + 'xPath': "\n\n \n Great Expectations\n Charles Dickens\n 1861\n 15.00\n \n \n Moby-Dick\n Herman Melville\n 1851\n 18.50\n \n \n Crime and Punishment\n Fyodor Dostoevsky\n 1866\n 20.00\n \n \n -\n -\n \n One\n \n 0.00\n \n" } function CreateContentControl(isInline, nPos) diff --git a/word/Editor/custom-xml/custom-xml.js b/word/Editor/custom-xml/custom-xml.js index 7b78e1ed7a..8934e14966 100644 --- a/word/Editor/custom-xml/custom-xml.js +++ b/word/Editor/custom-xml/custom-xml.js @@ -233,7 +233,7 @@ let steps = []; const marker = '#DOUBLE_SLASH#'; - let temp = xpath.replace(/\/\//g, `/${marker}/`); + let temp = xpath.replace(/\/\//g, function() {return '/' + marker + '/'}); let parts = temp.split('/').filter(function(el) {return el !== ""}); let deepNext = false;