rspec/rules/S4652/css/rule.adoc
Fred Tingaud 16f6c0aecf
Inline adoc when include has no additional value (#1940)
Inline adoc files when they are included exactly once.

Also fix language tags because this inlining gives us better information
on what language the code is written in.
2023-05-25 14:18:12 +02:00

53 lines
940 B
Plaintext

== Why is this an issue?
According to the W3C specifications:
____
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".
{empty}[...]
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 (\).
____
=== Noncompliant code example
[source,css]
----
a {
content: "first
second";
}
----
=== Compliant solution
[source,css]
----
a {
content: "first\Asecond";
}
----
== Resources
* https://www.w3.org/TR/CSS2/syndata.html#strings[CSS Specification] - Strings
ifdef::env-github,rspecator-view[]
'''
== Implementation Specification
(visible only on this page)
=== Message
Replace this new line with a line feed character in ISO-10646 encoding.
endif::env-github,rspecator-view[]