Take any templates that use jdoc include such as that:
<jdoc:include type="modules" name="topbar6" style="fav"/>
Break it into 2 different lines:
<jdoc:include type="modules" name="topbar6"
style="fav"/>
This is still correct syntax however the parser fail on it and will not render the module.
The parser should discard the carriage return and read to the end fo the tag.
The parser dont read the whole tag and just stop rendering
Joomla 3.9.19
Windows 10
This bug happened when editing a template inside phpstorm and using the reformat tool that with the hard wrapping at 120 columns will split deep enough include into 2 lines.
Labels |
Added:
?
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-11-12 10:44:31 |
Closed_By | ⇒ | joomdonation | |
Labels |
Added:
No Code Attached Yet
Removed: ? |
As the author of this issue came up with a solution, and no-one else has reported the same issue, I think it is not necessary to make change to the regex (which could introduce unexpected behavior-bugs). With that said, I'm closing this issue so that we can spend time on other more important one. Thanks !
One would have to change this regular expression
https://github.com/joomla/joomla-cms/blob/3.9.19/libraries/src/Document/HtmlDocument.php#L746
Adding a
s
modifier for including newlines, too.But this will go on: Between
jdoc:include
andtype=
exactly 1 white space is allowed. Must be replaced by something like\s+
I'm not a "performance expert" and not able to decide if it's worth to change this restricitive regular expression.
Aren't there possibilities in phpStorm to define reformat/rearrange exclusions?