Backed out changeset: f5712ba85504
This commit is contained in:
parent
51f08e6492
commit
c732a7a909
1 changed files with 8 additions and 13 deletions
|
@ -1662,10 +1662,10 @@ namespace ScrewTurn.Wiki {
|
|||
sb.Append(@""" title=""");
|
||||
if(!isImage && title.Length > 0) sb.Append(nstripped);
|
||||
else if(isImage && imageTitle.Length > 0) sb.Append(imageTitleStripped);
|
||||
else sb.Append(NoWikiUrl(targetUrl.Substring(1)));
|
||||
else sb.Append(targetUrl.Substring(1));
|
||||
sb.Append(@""">");
|
||||
if(title.Length > 0) sb.Append(title);
|
||||
else sb.Append(NoWikiUrl(targetUrl.Substring(1)));
|
||||
else sb.Append(targetUrl.Substring(1));
|
||||
sb.Append("</a>");
|
||||
}
|
||||
else if(targetUrl.StartsWith("http://") || targetUrl.StartsWith("https://") || targetUrl.StartsWith("ftp://") || targetUrl.StartsWith("file://")) {
|
||||
|
@ -1673,14 +1673,14 @@ namespace ScrewTurn.Wiki {
|
|||
sb.Append(@"<a");
|
||||
if(!isImage) sb.Append(@" class=""externallink""");
|
||||
sb.Append(@" href=""");
|
||||
sb.Append(NoWikiUrl(targetUrl));
|
||||
sb.Append(targetUrl);
|
||||
sb.Append(@""" title=""");
|
||||
if(!isImage && title.Length > 0) sb.Append(nstripped);
|
||||
else if(isImage && imageTitle.Length > 0) sb.Append(imageTitleStripped);
|
||||
else sb.Append(NoWikiUrl(targetUrl));
|
||||
else sb.Append(targetUrl);
|
||||
sb.Append(@""" target=""_blank"">");
|
||||
if(title.Length > 0) sb.Append(title);
|
||||
else sb.Append(NoWikiUrl(targetUrl));
|
||||
else sb.Append(targetUrl);
|
||||
sb.Append("</a>");
|
||||
}
|
||||
else if(targetUrl.StartsWith(@"\\") || targetUrl.StartsWith("//")) {
|
||||
|
@ -1688,14 +1688,14 @@ namespace ScrewTurn.Wiki {
|
|||
sb.Append(@"<a");
|
||||
if(!isImage) sb.Append(@" class=""externallink""");
|
||||
sb.Append(@" href=""file://///");
|
||||
sb.Append(NoWikiUrl(targetUrl.Substring(2)));
|
||||
sb.Append(targetUrl.Substring(2));
|
||||
sb.Append(@""" title=""");
|
||||
if(!isImage && title.Length > 0) sb.Append(nstripped);
|
||||
else if(isImage && imageTitle.Length > 0) sb.Append(imageTitleStripped);
|
||||
else sb.Append(NoWikiUrl(targetUrl));
|
||||
else sb.Append(targetUrl);
|
||||
sb.Append(@""" target=""_blank"">");
|
||||
if(title.Length > 0) sb.Append(title);
|
||||
else sb.Append(NoWikiUrl(targetUrl));
|
||||
else sb.Append(targetUrl);
|
||||
sb.Append("</a>");
|
||||
}
|
||||
else if(targetUrl.IndexOf("@") != -1 && targetUrl.IndexOf(".") != -1) {
|
||||
|
@ -1876,11 +1876,6 @@ namespace ScrewTurn.Wiki {
|
|||
return sb.ToString();
|
||||
}
|
||||
|
||||
// Wrap url in <nowiki> tags to prevent formatter to erroneously modify it.
|
||||
private static string NoWikiUrl(string url) {
|
||||
return "<nowiki>" + url + "</nowiki>";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Detects all the Headers in a block of text (H1, H2, H3, H4).
|
||||
/// </summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue