Resolve #3421843 "FilterAutoP should ignore twig.config debug html comments"
Closes #3421843
Merge request reports
Activity
added 1 commit
- 94e46190 - Update _filter_autop to ignore twig debugging
- Resolved by Scott Euser
- Resolved by Scott Euser
- Resolved by Scott Euser
- Resolved by Scott Euser
added 183 commits
-
fa23bbe9...bd4cf51b - 182 commits from branch
project:11.x
- 21d64a71 - Merge branch '11.x' into 3421843-filterautop-should-ignore
-
fa23bbe9...bd4cf51b - 182 commits from branch
added 1 commit
- 36adc146 - Update _filter_auto_p to account for updated theme debug markup
added 38 commits
-
36adc146...0697c814 - 37 commits from branch
project:11.x
- 8afb620e - Merge branch '11.x' into 3421843-filterautop-should-ignore
-
36adc146...0697c814 - 37 commits from branch
734 734 } 735 735 } 736 736 elseif (!$ignore) { 737 // Skip if the next chunk starts with Twig theme debug. 738 // @see twig_render_template() 739 if (isset($chunks[$i + 1]) && $chunks[$i + 1] === '<!-- THEME DEBUG -->') { I was nervous here of catching anything that isn't specifically added by core. Eg if someone happens put a normal
<!--
-->
comment then a link break would we not still want to add the auto p? To avoid breaking anything basically. Really wanted this to just stop making local/dev/staging behave differently from live sites.One thing I suppose I could do is add a separate test that enables twig debug, renders a template programmatically, and strips it - if your concern basically is what if the twig debug code changes again? That way changing the twig debug code would cause this test to fail. Would that be sufficient rather than making this less specific?
Was a bit trickier than I expected to do it at the kernel test level, but wanted to keep it there to avoid it being a longer running test + keeping it near the other test covering filter auto p. Wondering if this is okay - if there is any change to the formatting for theme debug, this will fail the test, so the change from [#3420709] would have triggered this then.
added 1 commit
- 61264028 - Ensure tests continue to apply even if twig debug formatting changes
added 268 commits
-
54d133ce...7dd6b190 - 267 commits from branch
project:11.x
- 07a902a2 - Merge branch '11.x' of git.drupal.org:project/drupal into 3421843-filterautop-should-ignore
-
54d133ce...7dd6b190 - 267 commits from branch