Skip to content

Avoid introducing extra whitespace around literal values on the concept page#1330

Merged
osma merged 1 commit intomasterfrom
fix-whitespace-in-literal-values
Jun 2, 2022
Merged

Avoid introducing extra whitespace around literal values on the concept page#1330
osma merged 1 commit intomasterfrom
fix-whitespace-in-literal-values

Conversation

@osma
Copy link
Member

@osma osma commented Jun 2, 2022

Reasons for creating this PR

After changes made in #1317, there is now some extra whitespace around literal property values (e.g. scope notes) shown on the concept page. This happened when a Twig single-line expression was broken up for readability. The extra whitespace causes problems e.g. when copying and pasting values.

This PR simply adds - modifiers to the Twig if tags, swallowing the extra whitespace around.

(reported by @kouralex who also assisted with the proper fix)

Link to relevant issue(s), if any

Description of the changes in this PR

  • add - modifiers to Twig tags to swallow unnecessary whitespace

Known problems or uncertainties in this PR

None, but probably more fixes like this would be appropriate.

Checklist

  • phpUnit tests pass locally with my changes
  • I have added tests that show that the new code works, or tests are not relevant for this PR (e.g. only HTML/CSS changes)
  • The PR doesn't reduce accessibility of the front-end code (e.g. tab focus, scaling to different resolutions, use of .sr-only class, color contrast)
  • The PR doesn't introduce unintended code changes (e.g. empty lines or useless reindentation)

@osma osma added the bug label Jun 2, 2022
@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #1330 (957ad52) into master (c61ac79) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             master    #1330   +/-   ##
=========================================
  Coverage     70.68%   70.68%           
  Complexity     1646     1646           
=========================================
  Files            32       32           
  Lines          3786     3786           
=========================================
  Hits           2676     2676           
  Misses         1110     1110           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c61ac79...957ad52. Read the comment docs.

@osma osma force-pushed the fix-whitespace-in-literal-values branch from b09178b to 3bcdb04 Compare June 2, 2022 11:43
@osma osma force-pushed the fix-whitespace-in-literal-values branch from 3bcdb04 to 957ad52 Compare June 2, 2022 11:45
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 2, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@osma osma merged commit 299aa59 into master Jun 2, 2022
@osma osma self-assigned this Jun 2, 2022
@osma osma added this to the 2.15 milestone Jun 2, 2022
@osma osma deleted the fix-whitespace-in-literal-values branch March 20, 2025 14:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant