"); // IE needs \r\n for line breaks dummy.Append(EscapeWikiMarkup(content).Replace("\n", "\r\n")); dummy.Append("
");
}
else {
img.Append(@" ");
}
if(bigUrl.Length > 0) {
dummy = new StringBuilder(200);
dummy.Append(@" "); img.Append(title); img.Append(" "); } if(c.Equals("imageauto")) { img.Append(" |
"); // IE needs \r\n for line breaks dummy.Append(match.Value.Substring(4, match.Value.Length - 8).Replace("\n", "\r\n")); dummy.Append(""); sb.Insert(match.Index, dummy.ToString()); } ComputeNoWiki(sb.ToString(), ref noWikiBegin, ref noWikiEnd); match = PreRegex.Match(sb.ToString(), end); } match = CodeRegex.Match(sb.ToString()); while(match.Success) { if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) { sb.Remove(match.Index, match.Length); dummy = new StringBuilder("
");
dummy.Append(match.Value.Substring(2, match.Value.Length - 4));
dummy.Append("
");
sb.Insert(match.Index, dummy.ToString());
}
ComputeNoWiki(sb.ToString(), ref noWikiBegin, ref noWikiEnd);
match = CodeRegex.Match(sb.ToString(), end);
}
string h;
// Hx: detection pass (used for the TOC generation and section editing)
hPos = DetectHeaders(sb.ToString());
// Hx: formatting pass
int count = 0;
match = H4Regex.Match(sb.ToString());
while(match.Success) {
if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) {
sb.Remove(match.Index, match.Length);
h = match.Value.Substring(5, match.Value.Length - 10 - (match.Value.EndsWith("\n") ? 1 : 0));
dummy = new StringBuilder(200);
dummy.Append(@""); sb.Append(Preferences.AlignWithTimezone(allChanges[i].DateTime).ToString(Settings.DateTimeFormat)); sb.Append(" | "); sb.Append(PrintRecentChange(allChanges[i], context, currentPage)); sb.Append(" | "); sb.Append("
");
sb.Append(@" ");
sb.Append(@" ");
sb.Append(""); sb.Append(TocTitlePlaceHolder); sb.Append(" "); sb.Append(@"");
sb.Append(" ");
sb.Append("
|
"); sb.Append(item.Replace(" || ", " | ")); sb.Append(" | "); } else if(item.IndexOf(" | ") != -1) { sb.Append(""); sb.Append(item.Substring(item.IndexOf(" | ") + 3)); sb.Append(" | "); } else { sb.Append(""); sb.Append(item); sb.Append(" | "); } } else if(lines[i].Trim().StartsWith("!")) { // Header if(lines[i].Length < 3) continue; // only if ! is found in the first row of the table, it is an header if(lines[i + 1] == "|-") thAdded = true; item = lines[i].Substring(2); if(item.IndexOf(" !! ") != -1) { sb.Append(""); sb.Append(item.Replace(" !! ", " | ")); sb.Append(" | "); } else if(item.IndexOf(" ! ") != -1) { sb.Append(""); sb.Append(item.Substring(item.IndexOf(" ! ") + 3)); sb.Append(" | "); } else { sb.Append(""); sb.Append(item); sb.Append(" | "); } } } if(sb.ToString().EndsWith("
---|---|---|---|---|---|---|---|