[completed: 244, 576] Fixed namespace handling for redirection.

This commit is contained in:
Dario Solera 2011-07-12 08:27:13 +02:00
parent 39e2bfd76b
commit 47f781355f
2 changed files with 10 additions and 2 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 // You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
[assembly: AssemblyVersion("3.0.4.575")] [assembly: AssemblyVersion("3.0.4.576")]
[assembly: AssemblyFileVersion("3.0.4.575")] [assembly: AssemblyFileVersion("3.0.4.576")]

View file

@ -185,6 +185,14 @@ namespace ScrewTurn.Wiki {
destination = destination.Substring(1, destination.Length - 2); destination = destination.Substring(1, destination.Length - 2);
} }
while(sb[match.Index] == '\n' && match.Index < sb.Length - 1) sb.Remove(match.Index, 1); while(sb[match.Index] == '\n' && match.Index < sb.Length - 1) sb.Remove(match.Index, 1);
if(!destination.StartsWith("++") && !destination.Contains(".") && current.FullName.Contains(".")) {
// Adjust namespace
destination = NameTools.GetFullName(NameTools.GetNamespace(current.FullName), destination);
}
destination = destination.Trim('+');
PageInfo dest = Pages.FindPage(destination); PageInfo dest = Pages.FindPage(destination);
if(dest != null) { if(dest != null) {
Redirections.AddRedirection(current, dest); Redirections.AddRedirection(current, dest);