Tentatively fixed #389 and #420: headers and list are no longer prepended with new lines (workaround).
This commit is contained in:
parent
438cbec9c1
commit
78fbf37929
2 changed files with 14 additions and 11 deletions
|
@ -7,7 +7,7 @@ using System.Text.RegularExpressions;
|
|||
using System.Web;
|
||||
|
||||
namespace ScrewTurn.Wiki {
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Implements reverse formatting methods (HTML->WikiMarkup).
|
||||
/// </summary>
|
||||
|
@ -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("<", "<");
|
||||
buffer.Replace(">", ">");
|
||||
|
||||
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue