
Problem/Motivation
The code in hierarchical-term-formatter.html.twig
adds space before and after the separator
. This means that if separator
is set to ,
(comma followed by space), for example, there will be a space after the word and before the comma. This is not how commas are supposed to be used.
Steps to reproduce
Set separator
is set to ,
. Observer the extra space.
Proposed resolution
Use Twig's whitespace control to remove the extra space in hierarchical-term-formatter.html.twig
.
Remaining tasks
Decide if a migration strategy is needed (see "API changes"). Implement.
User interface changes
None.
API changes
People may be relying on the current behaviour. If separator
is set to, for example, »
(without spaces) rather than »
(with spaces), they may not like how it appears.
Data model changes
None.
Comment | File | Size | Author |
---|---|---|---|
#7 | After.png | 172.74 KB | koustav_mondal |
#7 | Before.png | 184.21 KB | koustav_mondal |
Issue fork hierarchical_term_formatter-3501817
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
sayan_k_dutta CreditAttribution: sayan_k_dutta at Innoraft for Drupal India Association commentedWorking on it.
Comment #4
sayan_k_dutta CreditAttribution: sayan_k_dutta at Innoraft for Drupal India Association commentedMade the changes. Please review.
Also the pipeline was failing as the tests module was incompatible with D11. Made the fix for it. Pipeline is green now.
Comment #5
liam morlandThanks for the patch.
It seems to me that the default
separator
should stay the same so that existing installs do not change.Comment #6
koustav_mondal CreditAttribution: koustav_mondal at Innoraft commentedComment #7
koustav_mondal CreditAttribution: koustav_mondal at Innoraft commentedInstalled the module and tested. Looks good. Attaching screenshot for reference.
Comment #10
astonvictor CreditAttribution: astonvictor as a volunteer and at DevBranch commentedmerged to the dev branch
thanks all