mirror of
https://github.com/flextype/flextype.git
synced 2025-08-07 05:36:54 +02:00
feat(shortcodes): change parameter_value_delimiter format
This commit is contained in:
@@ -11,14 +11,14 @@ afterEach(function (): void {
|
||||
});
|
||||
|
||||
test('shortcodes directive', function () {
|
||||
entries()->create('shortcodes', ['foo' => '@shortcodes (strings prepend:"Hello ")World(/strings)']);
|
||||
entries()->create('shortcodes', ['foo' => "@shortcodes (strings prepend:'Hello ')World(/strings)"]);
|
||||
|
||||
$this->assertEquals('Hello World', entries()->fetch('shortcodes')['foo']);
|
||||
});
|
||||
|
||||
test('shortcodes directive disabled', function () {
|
||||
registry()->set('flextype.settings.entries.directives.shortcodes.enabled', false);
|
||||
entries()->create('shortcodes', ['foo' => '@shortcodes (strings prepend:"Hello ")World(/strings)']);
|
||||
$this->assertEquals('@shortcodes (strings prepend:"Hello ")World(/strings)', entries()->fetch('shortcodes')['foo']);
|
||||
entries()->create('shortcodes', ['foo' => "@shortcodes (strings prepend:'Hello ')World(/strings)"]);
|
||||
$this->assertEquals("@shortcodes (strings prepend:'Hello ')World(/strings)", entries()->fetch('shortcodes')['foo']);
|
||||
registry()->set('flextype.settings.entries.directives.shortcodes.enabled', true);
|
||||
});
|
@@ -5,7 +5,7 @@ declare(strict_types=1);
|
||||
test('(strings) shortcode', function () {
|
||||
|
||||
// lower
|
||||
$this->assertEquals("zed foo bar", "(strings lower)zed foo bar(/strings)");
|
||||
$this->assertEquals("zed foo bar", parsers()->shortcodes()->parse("(strings lower)zed foo bar(/strings)"));
|
||||
|
||||
// upper
|
||||
$this->assertEquals("ZED FOO BAR", parsers()->shortcodes()->parse("(strings upper)zed foo bar(/strings)"));
|
||||
|
Reference in New Issue
Block a user