emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/smartparens 9ffb373 1/2: Add support for triple quoted str


From: ELPA Syncer
Subject: [nongnu] elpa/smartparens 9ffb373 1/2: Add support for triple quoted string literals in Scala
Date: Tue, 17 Aug 2021 15:57:32 -0400 (EDT)

branch: elpa/smartparens
commit 9ffb373082fca531ccc8e878aeb2048b3b9abfb0
Author: Dmitry Polienko <dmitry@eldis.ru>
Commit: Dmitry Polienko <dmitry@eldis.ru>

    Add support for triple quoted string literals in Scala
---
 smartparens-scala.el           | 2 ++
 test/smartparens-scala-test.el | 7 +++++++
 2 files changed, 9 insertions(+)

diff --git a/smartparens-scala.el b/smartparens-scala.el
index 7e79016..7b37472 100644
--- a/smartparens-scala.el
+++ b/smartparens-scala.el
@@ -76,5 +76,7 @@
                                 ("| " "SPC")
                                 sp-scala-wrap-with-indented-newlines))
 
+(sp-local-pair 'scala-mode "\"\"\"" "\"\"\"")
+
 (provide 'smartparens-scala)
 ;;; smartparens-scala.el ends here
diff --git a/test/smartparens-scala-test.el b/test/smartparens-scala-test.el
index 596b0cb..5c669f5 100644
--- a/test/smartparens-scala-test.el
+++ b/test/smartparens-scala-test.el
@@ -43,3 +43,10 @@
       (scala-mode)
     (execute-kbd-macro "{")
     (should (equal (buffer-string) "{\n  foo\n}"))))
+
+(ert-deftest sp-test-scala-triple-quotes ()
+  "Close triple quotes"
+  (sp-test-with-temp-buffer "sql|"
+      (scala-mode)
+    (execute-kbd-macro (kbd "\"\"\"SELECT"))
+    (should (equal (buffer-string) "sql\"\"\"SELECT\"\"\""))))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]