diff --git a/package.json b/package.json
index ca89fab..c927a94 100644
--- a/package.json
+++ b/package.json
@@ -245,6 +245,11 @@
"command": "xmlTools.minifyXml",
"group": "1_modification@100",
"when": "editorLangId == 'xml'"
+ },
+ {
+ "command": "xmlTools.getCurrentXPath",
+ "group": "z_commands",
+ "when": "editorLangId == 'xml'"
}
]
},
@@ -280,4 +285,4 @@
"xpath": "0.0.27",
"xqlint": "^0.4.1"
}
-}
+}
\ No newline at end of file
diff --git a/src/test/extension.test.ts b/src/test/extension.test.ts
index dc4e04d..c2e20dd 100644
--- a/src/test/extension.test.ts
+++ b/src/test/extension.test.ts
@@ -107,6 +107,10 @@ describe("V2XmlFormatter", () => {
it("should not add trailing whitespace", () => {
testFormatter(xmlFormatter, options, "issue-288");
});
+
+ it("should handle mixed content on the same line as another element", () => {
+ testFormatter(xmlFormatter, options, "issue-294");
+ });
});
describe("#minifyXml(xml, options)", () => {
diff --git a/src/test/test-data/issue-294.formatted.xml b/src/test/test-data/issue-294.formatted.xml
new file mode 100644
index 0000000..0d46e60
--- /dev/null
+++ b/src/test/test-data/issue-294.formatted.xml
@@ -0,0 +1,7 @@
+
+
+
+ ThisCausesBug

+

+
+
\ No newline at end of file
diff --git a/src/test/test-data/issue-294.unformatted.xml b/src/test/test-data/issue-294.unformatted.xml
new file mode 100644
index 0000000..2fdc9de
--- /dev/null
+++ b/src/test/test-data/issue-294.unformatted.xml
@@ -0,0 +1,7 @@
+
+
+
+ ThisCausesBug

+

+
+
\ No newline at end of file