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

Possible to ignore wrapped strings? #42

Open
quazgar opened this issue Mar 8, 2024 · 0 comments
Open

Possible to ignore wrapped strings? #42

quazgar opened this issue Mar 8, 2024 · 0 comments

Comments

@quazgar
Copy link

quazgar commented Mar 8, 2024

Problem

In many languages, multiline strings may visually be less indented than the surrounding code. It is a pity that this is currently not reflected in yafolding.

Example

For example, this Python code:

def myfun():
    first_var = 987
    long_text = """Hello,
new line"""
    more = 123

folds into:

def myfun(): ...
new line"""
    more = 123

instead of:

def myfun(): ...

Suggestion / Question

Could yafolding be improved to detect long strings and ignore their dedentation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant