From fe54d9522bf2ba09cb15a9b2748eba6cfdaa97a7 Mon Sep 17 00:00:00 2001 From: Travis Parks Date: Wed, 16 Jan 2013 16:06:30 -0500 Subject: [PATCH] Default the Scope and Writer for Nested Contexts I forgot to default the KeyScope and TextWriter to the parent tag's scope and writer if they are not provided. --- mustache-sharp.test/Properties/AssemblyInfo.cs | 4 ++-- mustache-sharp/CompoundGenerator.cs | 4 ++-- mustache-sharp/Properties/AssemblyInfo.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mustache-sharp.test/Properties/AssemblyInfo.cs b/mustache-sharp.test/Properties/AssemblyInfo.cs index 458323d..3683a62 100644 --- a/mustache-sharp.test/Properties/AssemblyInfo.cs +++ b/mustache-sharp.test/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ using System.Runtime.InteropServices; // // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: -[assembly: AssemblyVersion("0.0.2.0")] -[assembly: AssemblyFileVersion("0.0.2.0")] +[assembly: AssemblyVersion("0.0.3.0")] +[assembly: AssemblyFileVersion("0.0.3.0")] diff --git a/mustache-sharp/CompoundGenerator.cs b/mustache-sharp/CompoundGenerator.cs index a7d0306..b641026 100644 --- a/mustache-sharp/CompoundGenerator.cs +++ b/mustache-sharp/CompoundGenerator.cs @@ -93,10 +93,10 @@ namespace mustache { foreach (IGenerator generator in generators) { - generator.GetText(context.KeyScope, context.Writer); + generator.GetText(context.KeyScope ?? scope, context.Writer ?? writer); if (context.WriterNeedsConsidated) { - writer.Write(_definition.ConsolidateWriter(context.Writer, arguments)); + writer.Write(_definition.ConsolidateWriter(context.Writer ?? writer, arguments)); } } } diff --git a/mustache-sharp/Properties/AssemblyInfo.cs b/mustache-sharp/Properties/AssemblyInfo.cs index c1b8c43..354808c 100644 --- a/mustache-sharp/Properties/AssemblyInfo.cs +++ b/mustache-sharp/Properties/AssemblyInfo.cs @@ -34,6 +34,6 @@ using System.Runtime.CompilerServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("0.0.2.0")] -[assembly: AssemblyFileVersion("0.0.2.0")] +[assembly: AssemblyVersion("0.0.3.0")] +[assembly: AssemblyFileVersion("0.0.3.0")] [assembly: InternalsVisibleTo("mustache-sharp.test")] \ No newline at end of file