Skip to content

Commit

Permalink
Merge pull request #2035 from mhnaeem/bug/add-grid-template-areas-to-…
Browse files Browse the repository at this point in the history
…non-semicolon-list

Add grid-template-areas to NON_SEMICOLON_NEWLINE_PROPERTY list
  • Loading branch information
bitwiseman authored Apr 12, 2022
2 parents ade6603 + 1809eb7 commit 5344f24
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
1 change: 1 addition & 0 deletions js/src/css/beautifier.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function Beautifier(source_text, options) {
"@document": true
};
this.NON_SEMICOLON_NEWLINE_PROPERTY = [
"grid-template-areas",
"grid-template"
];

Expand Down
2 changes: 1 addition & 1 deletion python/cssbeautifier/css/beautifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def __init__(self, source_text, opts=default_options()):
"@document",
}
self.CONDITIONAL_GROUP_RULE = {"@media", "@supports", "@document"}
self.NON_SEMICOLON_NEWLINE_PROPERTY = ["grid-template"]
self.NON_SEMICOLON_NEWLINE_PROPERTY = ["grid-template-areas", "grid-template"]

def eatString(self, endChars):
result = ""
Expand Down
15 changes: 15 additions & 0 deletions test/data/css/tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -1540,6 +1540,21 @@ exports.test_data = {
' grid-template: "top-bar" 100px;',
'}'
]
}, {
input: [
'div {',
'grid-template-areas: "a"',
' "b" ',
' "c";',
'}'
],
output: [
'div {',
' grid-template-areas: "a"',
' "b"',
' "c";',
'}'
]
}, {
input: [
'div {',
Expand Down

0 comments on commit 5344f24

Please sign in to comment.