mirror of
https://framagit.org/hubzilla/core.git
synced 2026-06-21 00:52:33 -04:00
get dev
This commit is contained in:
@@ -213,6 +213,11 @@ function bb_to_markdown_share($match) {
|
||||
}
|
||||
|
||||
|
||||
function bb_to_markdown_transform_tags($match) {
|
||||
return '#'. str_replace(' ', '_', $match[3]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Convert bbcode to Markdown.
|
||||
*
|
||||
@@ -226,8 +231,7 @@ function bb_to_markdown($Text, $options = []) {
|
||||
* Transform #tags, strip off the [url] and replace spaces with underscore
|
||||
*/
|
||||
|
||||
$Text = preg_replace_callback('/#\[([zu])rl\=(.*?)\](.*?)\[\/[(zu)]rl\]/i',
|
||||
create_function('$match', 'return \'#\'. str_replace(\' \', \'_\', $match[3]);'), $Text);
|
||||
$Text = preg_replace_callback('/#\[([zu])rl\=(.*?)\](.*?)\[\/[(zu)]rl\]/i', 'bb_to_markdown_transform_tags', $Text);
|
||||
|
||||
$Text = preg_replace('/#\^\[([zu])rl\=(.*?)\](.*?)\[\/([zu])rl\]/i', '[$1rl=$2]$3[/$4rl]', $Text);
|
||||
|
||||
@@ -282,7 +286,6 @@ function bb_to_markdown($Text, $options = []) {
|
||||
return $Text;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @brief Convert a HTML text into Markdown.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user