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

@script is broken #57

Open
sergejostir opened this issue Nov 18, 2019 · 2 comments
Open

@script is broken #57

sergejostir opened this issue Nov 18, 2019 · 2 comments

Comments

@sergejostir
Copy link

sergejostir commented Nov 18, 2019

Commit 16f9053 broke the @script directive.

@antoniancu, blade directives simply don't work like that.

    'script' => function ($expression) {
        if (! empty($expression)) {
            $expression = DirectivesRepository::parseMultipleArgs($expression);
            $defer = $expression->get(1) ? ' defer' : '';

            return '<script src="'.DirectivesRepository::stripQuotes($expression->get(0)).'"'.$defer.'></script>';
        }

        return '<script>';
    },

I'm surprised how nobody noticed that in nearly two months ...

@gizburdt
Copy link
Member

Thanks! Do you want to create a revert that fixes this? :)

@sergejostir
Copy link
Author

I don't use this package anymore, so I believe it's better that someone who uses this directive fixes it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants