[FEATURE] Spaceless ViewHelper 47/43747/6
authorClaus Due <claus@namelesscoder.net>
Fri, 2 Oct 2015 16:57:00 +0000 (18:57 +0200)
committerBenni Mack <benni@typo3.org>
Wed, 7 Oct 2015 09:22:38 +0000 (11:22 +0200)
commitc3107ec8c3cbbc2900dd9613cb4345962bbc8bf7
tree3d9577befff17c3d3a5832e704fbb3574bc8d6f7
parente925e8feddf61e158846e5656b6903a46f71fdd6
[FEATURE] Spaceless ViewHelper

Removes redundant spaces between HTML tags while
preserving the whitespace that may be inside HTML
tags. Trims the final result before output.

Heavily inspired by Twig's corresponding node type.

<code title="Usage of f:spaceless">
<f:spaceless>
<div>
    <div>
        <div>text

text</div>
    </div>
</div>
</f:spaceless>
</code>
<output>
<div><div><div>text

text</div></div></div>
</output>

Change-Id: I3aa88877619dfa8e681b53c2d4f5df91bb51d478
Resolves: #70170
Releases: master
Reviewed-on: http://review.typo3.org/43747
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Frans Saris <franssaris@gmail.com>
Tested-by: Frans Saris <franssaris@gmail.com>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/core/Documentation/Changelog/master/Feature-70170-ViewHelperToStripWhitespaceBetweenHTMLTags.rst [new file with mode: 0644]
typo3/sysext/fluid/Classes/ViewHelpers/SpacelessViewHelper.php [new file with mode: 0644]
typo3/sysext/fluid/Tests/Unit/ViewHelpers/SpacelessViewHelperTest.php [new file with mode: 0644]