Fixed and closed #506: {t:...} no longer requires the namespace.
This commit is contained in:
parent
7290ccfd2a
commit
8dc560ba05
2 changed files with 14 additions and 4 deletions
|
@ -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.2.509")]
|
[assembly: AssemblyVersion("3.0.2.510")]
|
||||||
[assembly: AssemblyFileVersion("3.0.2.509")]
|
[assembly: AssemblyFileVersion("3.0.2.510")]
|
||||||
|
|
|
@ -403,8 +403,18 @@ namespace ScrewTurn.Wiki {
|
||||||
while(match.Success) {
|
while(match.Success) {
|
||||||
if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) {
|
if(!IsNoWikied(match.Index, noWikiBegin, noWikiEnd, out end)) {
|
||||||
sb.Remove(match.Index, match.Length);
|
sb.Remove(match.Index, match.Length);
|
||||||
PageInfo info = Pages.FindPage(match.Value.Substring(3, match.Value.Length - 4));
|
string pageName = match.Value.Substring(3, match.Value.Length - 4);
|
||||||
if(info != null && info != current) { // Avoid circular transclusion!
|
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 = new StringBuilder();
|
||||||
dummy.Append(@"<div class=""transcludedpage"">");
|
dummy.Append(@"<div class=""transcludedpage"">");
|
||||||
dummy.Append(FormattingPipeline.FormatWithPhase1And2(Content.GetPageContent(info, true).Content,
|
dummy.Append(FormattingPipeline.FormatWithPhase1And2(Content.GetPageContent(info, true).Content,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue