Skip to content

Commit

Permalink
Started adapting markup for text needs
Browse files Browse the repository at this point in the history
  • Loading branch information
bentasker committed May 1, 2016
1 parent 1044d11 commit bcfe9ae
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions utils.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -678,6 +678,13 @@ function embedUserLink($match){
*/
function textProcessMarkup($str){
$str = preg_replace_callback("/(([A-Z0-9._%-\+]+)@([A-Z0-9_%-]+)\.([A-Z\.]{2,20}))/i",'obscureEmail',$str);

$str = preg_replace('/(\[View Commit\|)(.*?)(\])/s','$2',$str);
$str = preg_replace('/(\[View Changes\|)(.*?)(\])/s','$2',$str);
$str = preg_replace('/(\{quote\})(.*?)(\{quote\})/s',"-- Quote --\n\$2\n-- End Quote --",$str);
$str = preg_replace('/(\{noformat\})(.*?)(\{noformat\})/s',"-- Snippet --\n\$2\n-- End Snippet --",$str);


return wordwrap(html_entity_decode ($str),90,"\n");
}

Expand Down

0 comments on commit bcfe9ae

Please sign in to comment.