Commit 5a966343 for codemirror.net
commit 5a966343ec7c7f740f0dc01e4a8e7d0bd288c1ef
Author: David Foster <david.foster@techsmart.codes>
Date: Fri Apr 19 09:48:36 2024 -0700
Add regression test for issue #4641
diff --git a/test/comment_test.js b/test/comment_test.js
index 7deda791..22106671 100644
--- a/test/comment_test.js
+++ b/test/comment_test.js
@@ -115,4 +115,9 @@ namespace = "comment_";
cm.setCursor(1, 0)
cm.execCommand("toggleComment")
}, "<!-- foo\nbar -->", "<!-- foo\nbar -->")
+
+ test("toggleWithMultipleInnerComments", "javascript", function(cm) {
+ cm.execCommand("selectAll")
+ cm.execCommand("toggleComment")
+ }, "/* foo */\na\n/* bar */\nb", "// /* foo */\n// a\n// /* bar */\n// b")
})();