You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
The main point was described in detail in this conversation.
Some existing unit tests are overly paranoid, feeding the patcher with invalid source code and making sure it works even then. This is unnecessary and we should always expect valid HTML source code.
We should clean up and remove several such tests, and allow expanding several regex patterns to multiline, as well as remove a line from a patcher which strips line breaks in order to make it sturdier.
Describe the solution you'd like
These two regexes
At this point, these four tests will start failing, but we should completely remove two of them, and modify the other two, not to include/expect invalid HTML code:
Is your feature request related to a problem? Please describe.
The main point was described in detail in this conversation.
Some existing unit tests are overly paranoid, feeding the patcher with invalid source code and making sure it works even then. This is unnecessary and we should always expect valid HTML source code.
We should clean up and remove several such tests, and allow expanding several regex patterns to multiline, as well as remove a line from a patcher which strips line breaks in order to make it sturdier.
Describe the solution you'd like
These two regexes
should be extended to support line breaks in the middle of shortcodes (by adding the
s
modifier to the regex), and to allow matching elements such as for example:At this point, these four tests will start failing, but we should completely remove two of them, and modify the other two, not to include/expect invalid HTML code:
Finally, we can now remove the following line from the
ShortcodePullquotePatcher
:which was added to support cases such as this one:
and probably even add one such test.
Describe alternatives you've considered
It's not necessary to consider invalid HTML code.
Additional context
/
The text was updated successfully, but these errors were encountered: