mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 14:18:27 +01:00
Merge branch 'master' into develop
This commit is contained in:
commit
4f9cf42d53
@ -7,6 +7,7 @@ HumHub Changelog
|
||||
- Fix #5066: Fix pin and archive global content without container
|
||||
- Fix #5107: Fix captcha client validation after request new code
|
||||
- Fix #22: Fix misplaced OEmbed provider buttons on general settings form
|
||||
- Fix #5130: Don't require type for first param of the function ProsemirrorRichText::replaceLinkExtension()
|
||||
|
||||
|
||||
1.8.2 (April 26, 2021)
|
||||
|
@ -219,12 +219,13 @@ class ProsemirrorRichText extends AbstractRichText
|
||||
* Can be used to scan and replace link extensions of the form [<text>](<extension>:<url> "<title>") in which the actual meaning
|
||||
* of the placeholders is up to the extension itself.
|
||||
*
|
||||
* @param $text string rich text content to parse
|
||||
* @param $extension string|null extension string if not given all extension types will be included
|
||||
* @param string|null $text string rich text content to parse
|
||||
* @param string|null $extension extension string if not given all extension types will be included
|
||||
* @param callable $callback
|
||||
* @return mixed
|
||||
* @deprecated since 1.8 use `ProsemirrorRichTextConverter::replaceLinkExtension()`
|
||||
*/
|
||||
public static function replaceLinkExtension(string $text, $extension, callable $callback)
|
||||
public static function replaceLinkExtension(?string $text, ?string $extension, callable $callback)
|
||||
{
|
||||
return RichTextLinkExtension::replaceLinkExtension($text, $extension, function (RichTextLinkExtensionMatch $match) use ($callback) {
|
||||
return $callback($match->match);
|
||||
|
@ -26,12 +26,12 @@ class RichTextLinkExtension extends RichTextContentExtension
|
||||
* Can be used to scan and replace link extensions of the form [<text>](<extension>:<url> "<title>") in which the actual meaning
|
||||
* of the placeholders is up to the extension itself.
|
||||
*
|
||||
* @param $text string rich text content to parse
|
||||
* @param $extension string|null extension string if not given all extension types will be included
|
||||
* @param string|null $text rich text content to parse
|
||||
* @param string|null $extension extension string if not given all extension types will be included
|
||||
* @param callable $callback callable expecting RichTextExtensionMatch as first parameter
|
||||
* @return mixed
|
||||
*/
|
||||
public static function replaceLinkExtension(string $text, $extension, callable $callback)
|
||||
public static function replaceLinkExtension(?string $text, ?string $extension, callable $callback)
|
||||
{
|
||||
return (new static(['key' => $extension]))->replaceExtension($text, $callback);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user