swiftlang / sourcekit-lsp

Language Server Protocol implementation for Swift and C-based languages
Apache License 2.0
3.3k stars 273 forks source link

Add support for multi-line string literals when converting string concatenation to string interpolation #1568

Open AppAppWorks opened 2 months ago

AppAppWorks commented 2 months ago

Description

1551 added a code action for converting string concatenation to string interpolation, however multi-line string literals are not yet supported. We should add support for this, e.g.

"""
I
am
a
""" + value + 
"""
multi-line
string
literal
"""

will be converted to

"""
I
am
a\(value)multi-line
string
literal
"""
ahoppen commented 2 months ago

Synced to Apple’s issue tracker as rdar://131940259