Skip to content

Commit d5f6b59

Browse files
Adam Gabryśracodond
authored andcommitted
Add to the word-break property support of the break-word value (CSS3)
1 parent dd89446 commit d5f6b59

File tree

15 files changed

+22
-16
lines changed

15 files changed

+22
-16
lines changed

css-checks/src/test/resources/checks/common/properties/css/word-break.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-checks/src/test/resources/checks/common/properties/less/word-break.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-checks/src/test/resources/checks/common/properties/scss/word-break.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

css-frontend/src/main/java/org/sonar/css/model/property/standard/WordBreak.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@
2525
public class WordBreak extends StandardProperty {
2626

2727
public WordBreak() {
28-
addLinks("https://drafts.csswg.org/css-text-3/#propdef-word-break");
29-
addValidators(new IdentifierValidator("normal", "keep-all", "break-all"));
28+
addLinks("https://www.w3.org/TR/css-text-3/#word-break-property");
29+
addValidators(new IdentifierValidator("normal", "keep-all", "break-all", "break-word"));
3030
}
3131

3232
}

its/ruling/projects/custom/common/properties/css/word-break.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/projects/custom/common/properties/less/word-break.less

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/projects/custom/common/properties/scss/word-break.scss

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
word-break: normal;
44
word-break: keep-all;
55
word-break: break-all;
6-
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all}! */
6+
word-break: break-word;
7+
word-break: abc; /* Noncompliant !{Update the invalid value of property "word-break". Expected format: normal | keep-all | break-all | break-word}! */
78
word-break: 10; /* Noncompliant */
89
}

its/ruling/tests/src/test/expected/css-line-length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1091,7 +1091,7 @@
10911091
9,
10921092
],
10931093
'project:custom/common/properties/css/word-break.css':[
1094-
6,
1094+
7,
10951095
],
10961096
'project:custom/common/properties/css/word-spacing.css':[
10971097
8,

its/ruling/tests/src/test/expected/css-validate-property-value.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1659,8 +1659,8 @@
16591659
10,
16601660
],
16611661
'project:custom/common/properties/css/word-break.css':[
1662-
6,
16631662
7,
1663+
8,
16641664
],
16651665
'project:custom/common/properties/css/word-spacing.css':[
16661666
8,

its/ruling/tests/src/test/expected/less-line-length.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -991,7 +991,7 @@
991991
9,
992992
],
993993
'project:custom/common/properties/less/word-break.less':[
994-
6,
994+
7,
995995
],
996996
'project:custom/common/properties/less/word-spacing.less':[
997997
8,

0 commit comments

Comments
 (0)