Skip to content

Commit

Permalink
Correct links for mentions, issues and notes
Browse files Browse the repository at this point in the history
Links are not correct rendered if Markdown is enabled

Fixes #24201
  • Loading branch information
atrol committed Apr 2, 2018
1 parent 56ceb87 commit c731e8b
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions plugins/MantisCoreFormatting/MantisCoreFormatting.php
Expand Up @@ -170,6 +170,15 @@ function formatted( $p_event, $p_string, $p_multiline = true ) {
}
}

# Process Markdown
if( ON == $s_markdown ) {
if( $p_multiline ) {
$t_string = MantisMarkdown::convert_text( $t_string );
} else {
$t_string = MantisMarkdown::convert_line( $t_string );
}
}

if( ON == $s_urls && OFF == $s_markdown ) {
$t_string = string_insert_hrefs( $t_string );
}
Expand All @@ -180,15 +189,6 @@ function formatted( $p_event, $p_string, $p_multiline = true ) {

$t_string = mention_format_text( $t_string, /* html */ true );

# Process Markdown
if( ON == $s_markdown ) {
if( $p_multiline ) {
$t_string = MantisMarkdown::convert_text( $t_string );
} else {
$t_string = MantisMarkdown::convert_line( $t_string );
}
}

return $t_string;
}

Expand Down

0 comments on commit c731e8b

Please sign in to comment.