Indefero

Indefero Commit Details

Date:2008-11-23 14:58:43 (5 years 11 months ago)
Author:Loic d'Anterroches
Branch:dev, develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:7f88056bd9457110c8bb65326bef2dbd8483d74a
Parents: 39916d46f026622407441e7e1e6363132477afc9
Message:Fixed autolinking breaking MarkDown links.

Changes:
Msrc/IDF/Template/IssueComment.php (1 diff)
Msrc/IDF/Template/Markdown.php (1 diff)

File differences

src/IDF/Template/IssueComment.php
3232
3333
3434
35
35
3636
3737
3838
3939
4040
4141
42
43
44
42
43
44
45
46
4547
4648
4749
private $request = null;
private $scm = null;
function start($text, $request, $echo=true, $wordwrap=true, $esc=true)
function start($text, $request, $echo=true, $wordwrap=true, $esc=true, $autolink=true)
{
$this->project = $request->project;
$this->request = $request;
$this->scm = IDF_Scm::get($request);
if ($wordwrap) $text = wordwrap($text, 69, "\n", true);
if ($esc) $text = Pluf_esc($text);
$text = ereg_replace('[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]',
'<a href="\\0" rel="nofollow">\\0</a>',
$text);
if ($autolink) {
$text = ereg_replace('[[:alpha:]]+://[^<>[:space:]]+[[:alnum:]/]',
'<a href="\\0" rel="nofollow">\\0</a>',
$text);
}
if ($request->rights['hasIssuesAccess']) {
$text = preg_replace_callback('#(issues?|bugs?|tickets?)\s+(\d+)((\s+and|\s+or|,)\s+(\d+)){0,}#im',
array($this, 'callbackIssues'), $text);
src/IDF/Template/Markdown.php
5151
5252
5353
54
54
5555
5656
5757
$text = implode("\n", $tmp);
// Replace like in the issue text
$tag = new IDF_Template_IssueComment();
$text = $tag->start($text, $request, false, false, false);
$text = $tag->start($text, $request, false, false, false, false);
// Replace [[PageName]] with corresponding link to the page.
// if not the right to see the
$text = preg_replace_callback('#\[\[([A-Za-z0-9\-]+)\]\]#im',

Archive Download the corresponding diff file