Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Below is what I see when I turn on twig debugging and look at a flag link. ( flag.html.twig )
This is a nit pick ... but I just want to sweep up little things as I see them
My reaction is -- What .. where did all the newlines come from ... that is easy to fix. - spaceless
<!-- BEGIN OUTPUT from 'modules/flag/templates/flag.html.twig' -->
<a href="/flag/unflag/bookmark/1?destination=node&token=8NCfuzgS-vkaXRv8_4K80taO4R8sGGpk4DSN6LWBTrs" title="Remove this post from your bookmarks" class="use-ajax flag flag-bookmark flag-bookmark-1 action-unflag">Remove bookmark</a>
<!-- END OUTPUT from 'modules/flag/templates/flag.html.twig' -->
Comment | File | Size | Author |
---|---|---|---|
#6 | spaceless-2764903-6.patch | 459 bytes | martin107 |
#3 | spaceless-2764903-3.patch | 487 bytes | martin107 |
#2 | spaceless-2764903-2.patch | 519 bytes | martin107 |
Comments
Comment #2
martin107 CreditAttribution: martin107 commentedI hope this is quick to review.
Comment #3
martin107 CreditAttribution: martin107 commentedMy mistake --- I has separated a comment from the code is was associated with
Comment #4
gnugetHi martin107
Thanks for your patch.
All the files must finish with an empty line or GIT complains.
Comment #5
gnugetComment #6
martin107 CreditAttribution: martin107 commentedFixed.
Comment #7
gnugetIt is working but I'm not sure about this, looking through the generated code this problem is all over the drupal markup... (not just in the flag module). so... not so sure if we should fix this one in particular if the rest of the code has these spaces. I will leave the status as "needs review" in case someone else wants to comment about this.
Thanks for your patch.
Comment #8
martin107 CreditAttribution: martin107 commentedYes core is inconsistent
Just adding information to aid the discussion There are two link type templates in core that use spaceless
link-formatter-link-separate.html.twig
and
file-link.html.twig
Comment #9
socketwench CreditAttribution: socketwench as a volunteer commentedIf other link templates are using spaceless, I think it makes sense for us to do so too.
Comment #11
socketwench CreditAttribution: socketwench as a volunteer commented