Skip to content

Conversation

@Clarence-pan
Copy link
Contributor

I've got a raw output when there is a CRLF in @widget(...). For example:

@widget('pager', [
          "baseUrl" => "/product",
          "count" => $count,
])

output is still:

@widget('pager', [
          "baseUrl" => "/product",
          "count" => $count,
])

When I dived into laravel-widgets' sources, I was surprised about the matcher in \Arrilot\Widgets\ServiceProvider::createMatcher. Why are you recreate a matcher?

After I had used Blade::directive instead of $this->registerBladeDirective, it worked. The blade compile result is correct:

<?php echo app('arrilot.widget')->run('pager', [
          "baseUrl" => "/product",
          "count" => $count,
]); ?>

So, hope you can accept this PR.

Sorry for my poor English.

@arrilot arrilot merged commit c5e7d08 into arrilot:master Jul 10, 2016
@arrilot
Copy link
Owner

arrilot commented Jul 10, 2016

Our own matcher was used to allow backward compatibility with L5.0.

We can drop L5.0 now I guess, thanks

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

Successfully merging this pull request may close these issues.

2 participants