-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor baseUrl into variablePreprocessor (#1239)
BaseUrl processing is done in a separate stage involving repeated and recursive parsing / rendering of the content. This decreases cohesiveness of variable processing, and also performance due to the repeated parsing and rendering. With a framework for variable processing now, let's move baseUrl processing into it, solving the above said problems. To do this, MarkBind's reliance on xmlMode needs to be removed as well, as it isvery tightly coupled to the htmlparser call in resolveBaseUrl. xmlMode is also not compliant with many html specs, such as opening <p> tags being able to be closed by most other opening tags. Hence, let's instead patch htmlparser2 to enable it's self closing tag recognition and disable lower case attribute conversion to achieve this. Lastly, rendering of other variables containing html is also dependent on the extra htmlparser call in resolveBaseUrl which has the decodeEntities option turned on. Let's formally remove the need for this by using only the unescaped nunjucks environment to render variables.
- Loading branch information
Showing
28 changed files
with
154 additions
and
392 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
Oops, something went wrong.