-
-
Notifications
You must be signed in to change notification settings - Fork 929
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
Fix false positives for escaped multi-line URL in string-no-newline #4057
Comments
string-no-newline
string-no-newline
Thanks for the report and for using the template. I can't reproduce this error with the following code: .hello {
background-image: url(
"data:image/svg+xml;utf8,\
<svg fill='black' height='24' \
viewBox='0 0 24 24' width='24' \
xmlns='http://www.w3.org/2000/svg'\
><path d='M7 9l5 5 5-5z'/></svg>"
);
} Looks like you're also has Could you check please what is actual CSS, which triggers warning? Maybe there are many indentation symbols, and line is actually bigger than 80 symbols. |
Looks like our demo is misleading, it doesn't show problem, when CLI shows. For the following CSS: .hello {
background-image: url("data:image/svg+xml;utf8,\
<svg fill='black' height='24' \
viewBox='0 0 24 24' width='24' \
xmlns='http://www.w3.org/2000/svg'\
><path d='M7 9l5 5 5-5z'/></svg>");
} I got this violation:
Looks like it's a bug. As the issue has been labelled "help wanted", please consider contributing a fix. P. S. In original issue violation is incorrect, which confused me. |
Yes, my bad, sorry. There was a mess with #4059. But there're still two problems. |
string-no-newline
@hudochenkov Same problem #4059, postcss does not parse data url node:
|
For CLI it parses 🙈, but failing after on https://github.com/stylelint/stylelint/blob/master/lib/rules/string-no-newline/index.js#L83 parser returns source string instead of removing |
This issue is older than one month. Please ask before opening a pull request, as it may no longer be relevant. |
related: postcss/postcss#1349 |
I want to split large strings for aesthetic reasons with enabled
string-no-newline
rule.There is the quote from the specs, including:
But for some reason escaped newlines are forbidden in Stylelint.
string-no-newline
9.10.1
CLI with
stylelint assets/styles/
.No.
No warnings to be flagged.
The following warnings were flagged:
The text was updated successfully, but these errors were encountered: