mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-18 17:28:56 +00:00
[ticket/14323] Stylistic change [ci skip]
PHPBB3-14323
This commit is contained in:
parent
8fe94a19b4
commit
9a8fb2e1df
1 changed files with 7 additions and 5 deletions
|
@ -397,18 +397,20 @@ class parser implements \phpbb\textformatter\parser_interface
|
||||||
/**
|
/**
|
||||||
* Replace the content displayed inside of a URL tag
|
* Replace the content displayed inside of a URL tag
|
||||||
*
|
*
|
||||||
* Will only apply to URL tags that do not use any markup (e.g. not "[url]") on the assumption
|
* Will only apply to URL tags that do not use any markup (e.g. not "[url]")
|
||||||
* that those tags were created by the Autolink plugin to linkify URLs found in plain text
|
* on the assumption that those tags were created by the Autolink plugin to
|
||||||
|
* linkify URLs found in plain text
|
||||||
*
|
*
|
||||||
* @param \s9e\TextFormatter\Parser\Tag $url_tag URL tag (start tag)
|
* @param \s9e\TextFormatter\Parser\Tag $url_tag URL tag (start tag)
|
||||||
* @param \s9e\TextFormatter\Parser $parser Parser
|
* @param \s9e\TextFormatter\Parser $parser Parser
|
||||||
* @param string $board_url Forum's root URL (with trailing slash)
|
* @param string $board_url Forum's root URL (with trailing slash)
|
||||||
* @return bool Always TRUE to indicate that the tag is valid
|
* @return bool Always true to indicate that the tag is valid
|
||||||
*/
|
*/
|
||||||
public static function generate_autolink_text(\s9e\TextFormatter\Parser\Tag $url_tag, \s9e\TextFormatter\Parser $parser, $board_url)
|
public static function generate_autolink_text(\s9e\TextFormatter\Parser\Tag $url_tag, \s9e\TextFormatter\Parser $parser, $board_url)
|
||||||
{
|
{
|
||||||
// If the tag consumes any text then we ignore it because it's not a linkified URL. Same if
|
// If the tag consumes any text then we ignore it because it's not a
|
||||||
// it's not paired with an end tag that doesn't consume any text either
|
// linkified URL. Same if it's not paired with an end tag that doesn't
|
||||||
|
// consume any text either
|
||||||
if ($url_tag->getLen() > 0 || !$url_tag->getEndTag())
|
if ($url_tag->getLen() > 0 || !$url_tag->getEndTag())
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Add table
Reference in a new issue