Tentatively fixed #389 and #420: headers and list are no longer prepended with new lines (workaround).

This commit is contained in:
Dario Solera 2009-11-20 11:13:15 +00:00
parent 438cbec9c1
commit 78fbf37929
2 changed files with 14 additions and 11 deletions

View file

@ -16,5 +16,5 @@ using System.Reflection;
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.1.431")]
[assembly: AssemblyFileVersion("3.0.1.431")]
[assembly: AssemblyVersion("3.0.1.432")]
[assembly: AssemblyFileVersion("3.0.1.432")]

View file

@ -581,6 +581,16 @@ namespace ScrewTurn.Wiki {
//sb.Replace("\r\n<br />", "\r\n\r\n");
//sb.Replace("<br />", "{BR}\r\n");
buffer.Replace("<br />", "\r\n");
// Fix line breaks in IE
buffer.Replace("\r\n\r\n\r\n=====", "\r\n\r\n=====");
buffer.Replace("\r\n\r\n\r\n====", "\r\n\r\n====");
buffer.Replace("\r\n\r\n\r\n===", "\r\n\r\n===");
buffer.Replace("\r\n\r\n\r\n==", "\r\n\r\n==");
buffer.Replace("\r\n\r\n\r\n----", "\r\n\r\n----");
buffer.Replace("\r\n\r\n\r\n* ", "\r\n\r\n* ");
buffer.Replace("\r\n\r\n\r\n# ", "\r\n\r\n# ");
match = SingleNewLine.Match(buffer.ToString());
while(match.Success) {
buffer.Remove(match.Index, match.Length);
@ -588,13 +598,6 @@ namespace ScrewTurn.Wiki {
match = SingleNewLine.Match(buffer.ToString(), match.Index);
}
// Fix line breaks in IE
//sb.Replace("\r\n\r\n\r\n=====", "\r\n\r\n=====");
//sb.Replace("\r\n\r\n\r\n====", "\r\n\r\n====");
//sb.Replace("\r\n\r\n\r\n===", "\r\n\r\n===");
//sb.Replace("\r\n\r\n\r\n==", "\r\n\r\n==");
//sb.Replace("\r\n\r\n\r\n----", "\r\n\r\n----");
buffer.Replace("&lt;", "<");
buffer.Replace("&gt;", ">");
@ -995,7 +998,7 @@ namespace ScrewTurn.Wiki {
string provider, page, file;
GetProviderAndFileAndPage(rawUrl, out provider, out page, out file);
if (provider == null) return "{UP" + (page != null ? "(" + page + ")" : "") + "}" + file;
if(provider == null) return "{UP" + (page != null ? "(" + page + ")" : "") + "}" + file;
else return "{UP:" + provider + (page != null ? "(" + page + ")" : "") + "}" + file;
}
else return rawUrl;