Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suppress indentation when inserting newline after ''' #3780

Closed
bsutton opened this issue Jan 14, 2022 · 0 comments
Closed

Suppress indentation when inserting newline after ''' #3780

bsutton opened this issue Jan 14, 2022 · 0 comments
Labels
in editor Relates to code editing or language features is enhancement
Milestone

Comments

@bsutton
Copy link

bsutton commented Jan 14, 2022

The lint
leading_newlines_in_multiline_strings Start multiline strings with a newline.

tells us to place a new line after '''

  const sql = '''select *
from...
''';

The fix is easy. Just insert the cursor after the first set of ''' and hit return.

The problem is the resulting indentation is:

  const sql = '''
  select *
from...
''';

Note the two spaces before select.

Instead the indent should place select hard against the left hand border.

  const sql = '''
select *
from...
''';

The current method results in a changing of the format of the string (it goes from having no leading spaces to having two leading spaces).

@DanTup DanTup added this to the v3.34.0 milestone Jan 17, 2022
@DanTup DanTup added the in editor Relates to code editing or language features label Jan 17, 2022
@DanTup DanTup changed the title changed indent when inserting newline after ''' Suppress indentation when inserting newline after ''' Jan 17, 2022
@DanTup DanTup closed this as completed in 6131641 Jan 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in editor Relates to code editing or language features is enhancement
Projects
None yet
Development

No branches or pull requests

2 participants