-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Correct spaze/sri-macros concatenations (#367)
Check and make sure that spaze/sri-macros concatenated resources (e.g. `{script foo + bar}`) use spaces around the plus sign. This is needed because in [Latte 3.0.17](https://github.com/nette/latte/releases/tag/v3.0.17), unquoted strings can contain `+` but if it's specified as ` + `, with spaces, then the previous behavior works too. I've added tests in spaze/sri-macros#26, otherwise no change wasn't needed in that package. Follow-up to #365
- Loading branch information
Showing
8 changed files
with
31 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/sh | ||
|
||
echo "Wrong spaze/sri-macros concatenations (without spaces, e.g. {script foo+bar}):" | ||
|
||
BAD_LINES=$(grep --recursive --perl-regexp --ignore-case --line-number "{(script|stylesheet)" app/ | grep --perl-regexp "[^\s]\+|\+[^\s]") | ||
if [ "$BAD_LINES" ]; then | ||
echo "$BAD_LINES" | grep --color ".+." | ||
exit 1 | ||
else | ||
echo "None, all have spaces around the plus sign (foo + bar, not foo+bar)" | ||
exit 0 | ||
fi |