关于配置vscode 代码块不能使用 tab, 报错问题
- 当我们配置代码块使用tab进行缩进, 文件报错, 红色波浪线. 内容:Invalid characters in string. Control characters must be escaped.snippets(262)
- 解决方法: \t 转义字符 代替tab. 示例如下.
// 转义字符 \t => 代替tab
"Print to reqV3": {
"prefix": "req3",
"body": [
"const init$1 = async () => {",
"\tconst params = {}",
"\tconst { data } = await request$2(params)",
"\tconsole.log(data);",
"}",
],
"description": "Log output to async request by async await vue3"
},