-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
In addition to adding method signature typehints and general code tidying; this commit improves the ability of the SectionParser to handle extraneous section separators in appearing in settings, code, & markup content. With these changes; if extra separators are found in the markup section, instead of ignoring the extra sections they will be considered part of the markup section. Additionally, if extra sections are found in the markup section and there was previously only 1 or 2 sections total (markup only or settings and markup) the SectionParser::render() method will force there to be 3 sections in order to guarantee additional separators found in the markup section stay in the markup section. Another change to the SectionParser::render() method is that it will now throw an InvalidArgumentException if section separators are found in either the settings section or the code section as it is not currently possible to avoid accidentally parsing separators in those locations as if they were valid and intentional separators. This is somewhat related to octobercms/library@c393c5c although instead of just dropping all possible sections within markup and keeping the last one - this change implements more robust support for section separators appearing in places where they shouldn't. (cherry picked from commit 97c5da2)
- Loading branch information
1 parent
f813051
commit 03eb5ce
Showing
3 changed files
with
151 additions
and
65 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