-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Distinguish between classes and elements in pphtml (#1242)
When checking for unused/undefined CSS, classes and elements were stored in the same array, which was OK for most things. However, if a classname was also an element name (e.g. `br`) it would be incorrectly reported or ignored. This commit prepends a period to stored class names to match the class name in the CSS. It also treats anything like `<string` as a potential element name. This is safer than trying to maintain a list of all valid element names, and if the user has an invalid element name, the validator will tell them, so pphtml doesn't need to do that.
- Loading branch information
1 parent
69d62a0
commit b952ec8
Showing
2 changed files
with
35 additions
and
61 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