From 27af8f2caa0a8c248c783b4a7bcfa83d418ca4bd Mon Sep 17 00:00:00 2001 From: Dario Solera Date: Thu, 17 Jun 2010 13:41:22 +0000 Subject: [PATCH] Fixed and closed #537: {RecentChanges} disabled in preview mode. --- AssemblyVersion.cs | 4 ++-- Core/Formatter.cs | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 30017b7..f0f7631 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.543")] -[assembly: AssemblyFileVersion("3.0.2.543")] +[assembly: AssemblyVersion("3.0.2.544")] +[assembly: AssemblyFileVersion("3.0.2.544")] diff --git a/Core/Formatter.cs b/Core/Formatter.cs index 23578ce..107134c 100644 --- a/Core/Formatter.cs +++ b/Core/Formatter.cs @@ -2393,15 +2393,16 @@ namespace ScrewTurn.Wiki { sb.Replace(SectionLinkTextPlaceHolder, Exchanger.ResourceExchanger.GetResource("LinkToThisSection")); - match = RecentChangesRegex.Match(sb.ToString()); - while(match.Success) { - sb.Remove(match.Index, match.Length); - string trimmedTag = match.Value.Trim('{', '}'); - // If current page is null, assume root namespace - NamespaceInfo currentNamespace = null; - if(current != null) currentNamespace = Pages.FindNamespace(NameTools.GetNamespace(current.FullName)); - sb.Insert(match.Index, BuildRecentChanges(currentNamespace, trimmedTag.EndsWith("(*)"), context, current)); + if(current != null) { match = RecentChangesRegex.Match(sb.ToString()); + while(match.Success) { + sb.Remove(match.Index, match.Length); + string trimmedTag = match.Value.Trim('{', '}'); + // If current page is null, assume root namespace + NamespaceInfo currentNamespace = currentNamespace = Pages.FindNamespace(NameTools.GetNamespace(current.FullName)); + sb.Insert(match.Index, BuildRecentChanges(currentNamespace, trimmedTag.EndsWith("(*)"), context, current)); + match = RecentChangesRegex.Match(sb.ToString()); + } } match = null;