Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: non-eager matching raw-block-contents
In 4.4.4 the block-contents was matched with an eager match, which means that with multiple raw-blocks of the same kind, the block was spanned over the first ending-tag until the last one. This commit replaces this by a non-eager match. closes #1579
- Loading branch information
Showing
3 changed files
with
15 additions
and
2 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -47,10 +47,18 @@ describe('helpers', function() { | |
runWithIdentityHelper('{{{{identity}}}}{{{{/identity}}}}', ''); | ||
}); | ||
|
||
it('helper for nested raw block works if nested raw blocks are broken', function() { | ||
xit('helper for nested raw block works if nested raw blocks are broken', function() { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
nknapp
Author
Collaborator
|
||
// This test was introduced in 4.4.4, but it was not the actual problem that lead to the patch release | ||
// The test is deactivated, because in 3.x this template cases an exception and it also does not work in 4.4.3 | ||
// If anyone can make this template work without breaking everything else, then go for it, | ||
// but for now, this is just a known bug, that will be documented. | ||
runWithIdentityHelper('{{{{identity}}}} {{{{a}}}} {{{{ {{{{/ }}}} }}}} {{{{/identity}}}}', ' {{{{a}}}} {{{{ {{{{/ }}}} }}}} '); | ||
}); | ||
|
||
it('helper for nested raw block closes after first matching close', function() { | ||
runWithIdentityHelper('{{{{identity}}}}abc{{{{/identity}}}} {{{{identity}}}}abc{{{{/identity}}}}', 'abc abc'); | ||
}); | ||
|
||
it('helper for nested raw block throw exception when with missing closing braces', function() { | ||
var string = '{{{{a}}}} {{{{/a'; | ||
shouldThrow(function() { | ||
|
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
1 comment
on commit 6ed1a80
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
is this maybe a typo?