This repository has been archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix edge-case for boolean attributes in opening tags
Fixes #49
- Loading branch information
1 parent
82f803e
commit 94d2f7d
Showing
5 changed files
with
15 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 7 additions & 7 deletions
14
...napshots__/ComponentCompilationTest__it_compiles_boolean_attributes_as_true_values__2.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
<?xml version="1.0"?> | ||
<div> | ||
<?php $__env->startComponent( | ||
<div><?php $__env->startComponent( | ||
'components.checkbox', | ||
array_merge(app(Spatie\BladeX\ContextStack::class)->read(), | ||
['name' => 'This one\'s checked','checked' => true]) | ||
); ?> | ||
<?php echo $__env->renderComponent(); ?> | ||
<?php $__env->startComponent( | ||
); ?><?php echo $__env->renderComponent(); ?><?php $__env->startComponent( | ||
'components.checkbox', | ||
array_merge(app(Spatie\BladeX\ContextStack::class)->read(), | ||
['name' => 'This one shouldn\'t be checked']) | ||
); ?> | ||
<?php echo $__env->renderComponent(); ?> | ||
); ?><?php echo $__env->renderComponent(); ?><?php $__env->startComponent( | ||
'components.checkbox', | ||
array_merge(app(Spatie\BladeX\ContextStack::class)->read(), | ||
['checked' => true]) | ||
); ?> content <?php echo $__env->renderComponent(); ?> | ||
</div> |
2 changes: 2 additions & 0 deletions
2
tests/Features/ComponentCompilation/stubs/views/componentWithBooleanAttribute.blade.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
<checkbox name="This one's checked" checked /> | ||
|
||
<checkbox name="This one shouldn't be checked" /> | ||
|
||
<checkbox checked>content</checkbox> |