diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 999e639..42e726c 100644 --- a/AssemblyVersion.cs +++ b/AssemblyVersion.cs @@ -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.2.509")] -[assembly: AssemblyFileVersion("3.0.2.509")] +[assembly: AssemblyVersion("3.0.2.510")] +[assembly: AssemblyFileVersion("3.0.2.510")] diff --git a/Core/Formatter.cs b/Core/Formatter.cs index 8b75a2b..2a3d9a3 100644 --- a/Core/Formatter.cs +++ b/Core/Formatter.cs @@ -403,8 +403,18 @@ namespace ScrewTurn.Wiki { while(match.Success) { if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) { sb.Remove(match.Index, match.Length); - PageInfo info = Pages.FindPage(match.Value.Substring(3, match.Value.Length - 4)); - if(info != null && info != current) { // Avoid circular transclusion! + string pageName = match.Value.Substring(3, match.Value.Length - 4); + if(pageName.StartsWith("++")) pageName = pageName.Substring(2); + else { + // Add current namespace, if not present + string tsNamespace = NameTools.GetNamespace(pageName); + string currentNamespace = current != null ? NameTools.GetNamespace(current.FullName) : null; + if(string.IsNullOrEmpty(tsNamespace) && !string.IsNullOrEmpty(currentNamespace)) { + pageName = NameTools.GetFullName(currentNamespace, pageName); + } + } + PageInfo info = Pages.FindPage(pageName); + if(info != null && (current != null && info.FullName != current.FullName)) { // Avoid circular transclusion! dummy = new StringBuilder(); dummy.Append(@"
"); dummy.Append(FormattingPipeline.FormatWithPhase1And2(Content.GetPageContent(info, true).Content,