File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 107107 (sp-local-pair " <" " >"
108108 :when '(sp-swift-filter-angle-brackets)
109109 :skip-match 'sp-swift-skip-match-angle-bracket )
110- (sp-local-pair " \"\"\" " " \"\"\" " ))
110+ (sp-local-pair " \"\"\" " " \"\"\" " )
111+ (sp-local-pair " \\ (" " )" :actions '(wrap insert) :when '(sp-in-string-p)))
111112
112113; ; Swift has no sexp suffixes. This fixes slurping
113114; ; (|foo).bar -> (foo.bar)
Original file line number Diff line number Diff line change @@ -123,3 +123,10 @@ func bar(x: UInt64) -> Bool {
123123 (mark-whole-buffer )
124124 (call-interactively 'sp-kill-region )
125125 (should (equal (buffer-string ) " " ))))
126+
127+ (ert-deftest sp-test-swift-string-interp-paren ()
128+ " String interpolation should not escape closing paren"
129+ (sp-test-with-temp-buffer " print(\" foo is: |\" )"
130+ (swift-mode)
131+ (execute-kbd-macro " \\ (" )
132+ (sp-buffer-equals " print(\" foo is: \\ (|)\" )" )))
You can’t perform that action at this time.
0 commit comments