Reputation: 2145
I have read the answer to this similar question: Do I need quotes for strings in YAML?
However, there was no answer for whether we can escape quotes with strings containing forward slashes /
.
For example, do we need to add quotes to the following eslint rule 'react/no-deprecated': off
?
Upvotes: 9
Views: 14382
Reputation: 39708
No, /
is not a special character in YAML. YAML allows the escape sequence \/
in double-quoted scalars to resolve to /
for JSON compatibility, but there is no requirement to use this escape sequence and no requirement to use quotes at all to use /
as content character.
Upvotes: 12