diff --git a/AssemblyVersion.cs b/AssemblyVersion.cs index 62c285f..c33ab6d 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.1.400")] -[assembly: AssemblyFileVersion("3.0.1.400")] +[assembly: AssemblyVersion("3.0.1.401")] +[assembly: AssemblyFileVersion("3.0.1.401")] diff --git a/Core/Formatter.cs b/Core/Formatter.cs index b81cc40..1622371 100644 --- a/Core/Formatter.cs +++ b/Core/Formatter.cs @@ -48,6 +48,7 @@ namespace ScrewTurn.Wiki { private static readonly Regex HRRegex = new Regex(@"(?<=(\n|^))(\ )*----(\ )*\n", RegexOptions.Compiled); //private static readonly Regex SnippetRegex = new Regex(@"\{S(\:|\|)(.+?)(\|(.+?))*}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant); private static readonly Regex SnippetRegex = new Regex(@"\{s\:(.+?)(\|.*?)*\}", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Singleline); + private static readonly Regex ClassicSnippetVerifier = new Regex(@"\|\ ?[a-z0-9]+\ ?\=", RegexOptions.Compiled | RegexOptions.IgnoreCase); private static readonly Regex TableRegex = new Regex(@"\{\|(\ [^\n]*)?\n.+?\|\}", RegexOptions.Compiled | RegexOptions.Singleline); private static readonly Regex IndentRegex = new Regex(@"(?<=(\n|^))\:+(\ )?.+?\n", RegexOptions.Compiled); private static readonly Regex EscRegex = new Regex(@"\(.|\n|\r)*?\<\/esc\>", RegexOptions.Compiled | RegexOptions.IgnoreCase | RegexOptions.CultureInvariant | RegexOptions.Singleline); @@ -1296,7 +1297,8 @@ namespace ScrewTurn.Wiki { /// The formatted result. private static string FormatSnippet(string capturedMarkup, string cachedToc) { // If the markup does not contain equal signs, process it using the classic method, assuming there are only positional parameters - if(capturedMarkup.IndexOf("=") == -1) { + //if(capturedMarkup.IndexOf("=") == -1) { + if(!ClassicSnippetVerifier.IsMatch(capturedMarkup)) { string tempRes = FormatClassicSnippet(capturedMarkup); return ReplaceToc(tempRes, cachedToc); }