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

指定字符串使用单引号还是双引号 #17

Closed
sumneko opened this issue Feb 17, 2022 · 1 comment
Closed

指定字符串使用单引号还是双引号 #17

sumneko opened this issue Feb 17, 2022 · 1 comment
Labels
discuss enhancement New feature or request

Comments

@sumneko
Copy link

sumneko commented Feb 17, 2022

在指定使用单引号时:

print('xxx', "xxx")

格式化为

print('xxx', 'xxx')

例外规则:字符串内包含指定的引号类型时不进行格式化,例如:

print('xxx', "xxx", "xx'xx")

格式化为

print('xxx', 'xxx', "xx'xx")
@CppCXY CppCXY added discuss enhancement New feature or request labels Feb 18, 2022
@CppCXY
Copy link
Owner

CppCXY commented Feb 18, 2022

如果字符串内只有转义的对应引号,那么可以继续格式化引号

@CppCXY CppCXY closed this as completed in 6606b51 Feb 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants