1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 04:17:33 -04:00
notes/node_modules/stylelint/lib/rules/string-no-newline/README.md
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

1.1 KiB

string-no-newline

Disallow (unescaped) newlines in strings.

a {
  content: "first
    second";     
}                
/**              ↑
 * The newline here */

The spec says this: "A string cannot directly contain a newline. To include a newline in a string, use an escape representing the line feed character in ISO-10646 (U+000A), such as "\A" or "\00000a"." And also: "It is possible to break strings over several lines, for aesthetic or other reasons, but in such a case the newline itself has to be escaped with a backslash ()."

Options

true

The following patterns are considered warnings:

a {
  content: "first
    second";     
}  
[title="something
is probably wrong"] {}  
a {
  font-family: "Times
    New
    Roman";
}  

The following patterns are not considered warnings:

a {
  content: "first\Asecond";     
}  
a {
  content: "first\\nsecond";     
}  
[title="nothing\
  is wrong"] {}  
a {
  font-family: "Times New Roman";
}