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

Attempting to change inner quotes actually modifies the most outer quotes #92

Closed
zzantares opened this issue Nov 26, 2016 · 4 comments
Closed

Comments

@zzantares
Copy link

Hello, I have a problem, in python having this (cursor is | in word access_token):

            body="""
            {
                "access|_token": "fg123234ksdf9whgelxsurgpr",
                "expires_at": 3600,
                "user_id": "5194"
            }
            """)

Doing cs"' to change double quotes to single quotes ("access_token" to 'access_token') produces this:

            body='|""
            {
                "access_token": "fg123234ksdf9whgelxsurgpr",
                "expires_at": 3600,
                "user_id": "5194"
            }
            ""')

Notice, the most outer double quotes are changed, and cursor changes position.

Is there an easy fix to this?

@ninrod
Copy link
Member

ninrod commented Jan 16, 2017

the body=""" bit is confusing to the package. Seems like you are opening a multiline string. I think a linewise option should solve the problem, but I'm only starting to learn elisp.

Just curious, how often do you use this sort of triple quotes construct in python?

@ninrod
Copy link
Member

ninrod commented Jan 16, 2017

this is directly related to #56.

@ninrod
Copy link
Member

ninrod commented Jan 16, 2017

closing. duplicate of #56.

@ninrod ninrod closed this as completed Jan 16, 2017
@zzantares
Copy link
Author

Thanks @ninrod, about your question that is an extract of a definition of a mock URL using httpretty on python, really I don't use it too often but when I do is annoying that this doesn't work as expected.

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

No branches or pull requests

2 participants