Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[html-extra] filter classes #3969

Merged
merged 1 commit into from Apr 29, 2024
Merged

Conversation

kbond
Copy link
Contributor

@kbond kbond commented Jan 23, 2024

A small formatting change to avoid double spaces:

class="{{ html_classes('a', false ? 'b', true ? 'c') }}"

{# before #}
class="a  c"

{# after #}
class="a c"

@kbond kbond force-pushed the feat/html-classes-improvements branch from 0716779 to 2dbc861 Compare January 23, 2024 14:43
Copy link
Member

@stof stof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR clearly needs a description explaining what it expects doing.

extra/html-extra/HtmlExtension.php Outdated Show resolved Hide resolved
@kbond kbond force-pushed the feat/html-classes-improvements branch from 2dbc861 to b08181e Compare January 23, 2024 17:31
@@ -75,7 +75,7 @@ public function dataUri(string $data, string $mime = null, array $parameters = [
$repr .= ';'.$key.'='.rawurlencode($value);
}

if (0 === strpos($mime, 'text/')) {
if (str_starts_with($mime, 'text/')) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be reverted

@fabpot fabpot force-pushed the feat/html-classes-improvements branch from b08181e to a517c14 Compare April 29, 2024 19:43
@fabpot
Copy link
Contributor

fabpot commented Apr 29, 2024

Thank you @kbond.

@fabpot fabpot merged commit 68a826c into twigphp:3.x Apr 29, 2024
3 of 4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants