- Issue created by @scott_euser
- Merge request !6640Resolve #3421843 "FilterAutoP should ignore twig.config debug html comments" β (Closed) created by scott_euser
- Status changed to Needs work
9 months ago 9:13am 16 February 2024 - π¬π§United Kingdom scott_euser
Tests showing this is failing with:
<p>Text here <!-- THEME DEBUG --> <!-- THEME HOOK: 'html' --> <!-- FILE NAME SUGGESTIONS: * html--node.html.twig x html.html.twig --> <span>Test</span></p>
Results in:
<p>Text here</p> <!-- THEME DEBUG --> <!-- THEME HOOK: 'html' --> <!-- FILE NAME SUGGESTIONS: * html--node.html.twig x html.html.twig --> <p><span>Test</span></p>
Note that when you have twig debug enabled, line breaks are always added before and after the nested twig template, even with
{% apply spaceless %}{% end apply %}
- Status changed to Needs review
9 months ago 9:57am 16 February 2024 - π¬π§United Kingdom scott_euser
Okay this handles it now. Avoided regex here as its getting overly complicated given the regex would need to work across lines. Figured it is more straightforward and readable to check subsequent and preceding lines.
To test this out, without change to filter.module, this now fails:
./vendor/bin/phpunit -c core/phpunit.xml --debug core/modules/filter/tests/src/Kernel/FilterKernelTest.php --filter=testLineBreakFilter
With THE change to filter.module, it passes.
- π§πͺBelgium wim leers Ghent π§πͺπͺπΊ
Makes sense!
Note that only the text format uses this by default. If you're using CKEditor 5, you should not be using
filter_autop
at all, and you can safely disable it. - Status changed to RTBC
9 months ago 11:39am 16 February 2024 - Issue was unassigned.
- π¬π§United Kingdom scott_euser
Thanks for the quick review! Applied your suggestions, looks like this is ready to go then. Thanks!
- π¬π§United Kingdom scott_euser
Updating issue summary to mark all as completed as well (forgot!)
- Status changed to Needs work
9 months ago 12:28am 3 March 2024 - π«π·France nod_ Lille
Needs updating after β¨ Make it more obvious that a Twig template is overridden Fixed got in
- Status changed to Needs review
9 months ago 6:54am 5 March 2024 - π¬π§United Kingdom scott_euser
Thanks for flagging. I updated the filter to cover that now + added an additional bit to the test.
- π¬π§United Kingdom scott_euser
I think I did grab all from 11.x and merge it in. Isn't the squashing of commits happening when this eventually gets merged in? Probably I am not understanding what you are asking @smustgrave sorry :)
- πΊπΈUnited States smustgrave
Appears to be failing unit tests but have seen that resolved with a rebase.
- Status changed to RTBC
9 months ago 4:51pm 5 March 2024 - πΊπΈUnited States smustgrave
Seeing green now
Ran the test-only feature https://git.drupalcode.org/issue/drupal-3421843/-/jobs/995505 and it failed as expected.
Appears feedback has been addressed with regards to #11.
Looks good!
- π¬π§United Kingdom scott_euser
Ah nice, handy feature; saw that 'Downstream failure' and got curious. Thanks for jumping in and helping get this one ready again!
- Status changed to Needs review
8 months ago 3:20pm 7 March 2024 - π¬π§United Kingdom scott_euser
@catch added a suggested route instead of making it more generic - what dok you think?
- Status changed to Needs work
8 months ago 4:29pm 14 March 2024 - πΊπΈUnited States smustgrave
@scott_euser seemed to got the thumbs up for that approach
- Status changed to Needs review
8 months ago 9:21pm 4 April 2024 - Status changed to RTBC
7 months ago 1:17am 6 April 2024 - πΊπΈUnited States smustgrave
Did a rebase and that unit failure went away. Seen that on a few slightly older tickets.
From what I can tell feedback has been addressed and the update didn't break the changes added in β¨ Make it more obvious that a Twig template is overridden Fixed
- Status changed to Fixed
7 months ago 12:48pm 6 April 2024 - π«π·France nod_ Lille
Tests fail on 10.2.x, won't backport there. Please open a 10.2.x MR for it if it's important to have on that version.
Automatically closed - issue fixed for 2 weeks with no activity.