From fb06e0a88b47fe8505b87dbbf88aad47e9b300e2 Mon Sep 17 00:00:00 2001 From: Amaury Levé Date: Thu, 21 Jun 2018 17:11:48 +0200 Subject: Rule S4652: Strings should not contain new lines (#57) --- .../org/sonar/l10n/css/rules/css/S4652.html | 26 ++++++++++++++++++++++ .../org/sonar/l10n/css/rules/css/S4652.json | 16 +++++++++++++ .../l10n/css/rules/css/Sonar_way_profile.json | 3 ++- 3 files changed, 44 insertions(+), 1 deletion(-) create mode 100644 sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4652.html create mode 100644 sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4652.json (limited to 'sonar-css-plugin/src/main/resources') diff --git a/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4652.html b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4652.html new file mode 100644 index 0000000..ae6f801 --- /dev/null +++ b/sonar-css-plugin/src/main/resources/org/sonar/l10n/css/rules/css/S4652.html @@ -0,0 +1,26 @@ +
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".
+[...]
+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 (\).
+
+a {
+ content: "first
+ second";
+}
+
+
+a {
+ content: "first\Asecond";
+}
+
+