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

Escape characters for set_configvar #1872

Closed
xq114 opened this issue Dec 1, 2021 · 1 comment
Closed

Escape characters for set_configvar #1872

xq114 opened this issue Dec 1, 2021 · 1 comment

Comments

@xq114
Copy link
Contributor

xq114 commented Dec 1, 2021

你在什么场景下需要该功能?

set_configvar("TEST", "$(projectdir)")

会展开成

#define TEST "C:\...\project"

在给字符串自动加引号时对\等字符的转义没有处理,而要正确处理转义就必须在on_load里面进行,非常麻烦;或者使用STRINGIFY宏和quote=false选项来进行,也很麻烦

描述可能的解决方案

set_configvar("TEST", "$(projectdir)", {escape = true})

在加引号的同时处理转义问题,默认不处理的行为不动

@waruqi
Copy link
Member

waruqi commented Dec 5, 2021

加了 7dc1142

@waruqi waruqi added this to the v2.6.2 milestone Dec 5, 2021
@waruqi waruqi closed this as completed Dec 5, 2021
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