-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Use CssParser to correctly pass options to wkhtmltopdf
- Regex incorrectly fetches .print-format's child styles and also extracts the wrong attribute value - A CssParser is more maintainable and more readable as well as less prone to errors while extracting values - Method: We extract style tag contents out of the html and tokenize them. We then filter the styles for the right selector and extract the attributes we want from them. - This way we make sure that the right value is extracted and only the ones applicable to .print-format directly (cherry picked from commit 5dbcbbb)
- Loading branch information
1 parent
c15b47a
commit e9811ea
Showing
2 changed files
with
45 additions
and
9 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