-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[9.x] feature:
Str::inlineMarkdown()
(#43126)
* feature: Inline markdown helpers * chore: fix styleci * Update Str.php Co-authored-by: Taylor Otwell <[email protected]>
- Loading branch information
1 parent
6dd6884
commit 8301bcd
Showing
4 changed files
with
46 additions
and
0 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
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 |
---|---|---|
|
@@ -959,6 +959,12 @@ public function testMarkdown() | |
$this->assertEquals("<h1>hello world</h1>\n", $this->stringable('# hello world')->markdown()); | ||
} | ||
|
||
public function testInlineMarkdown() | ||
{ | ||
$this->assertEquals("<em>hello world</em>\n", $this->stringable('*hello world*')->inlineMarkdown()); | ||
$this->assertEquals("<a href=\"https://laravel.com\"><strong>Laravel</strong></a>\n", $this->stringable('[**Laravel**](https://laravel.com)')->inlineMarkdown()); | ||
} | ||
|
||
public function testMask() | ||
{ | ||
$this->assertSame('tay*************', (string) $this->stringable('[email protected]')->mask('*', 3)); | ||
|