Skip to content

Commit

Permalink
Update Parlot (#335)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienros authored May 4, 2021
1 parent 8f86a6a commit 0ecb093
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
15 changes: 11 additions & 4 deletions Fluid.Tests/ParserTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -517,13 +517,20 @@ public void StringsCanContainCurlies(string source, string expected)
[Fact]
public void ShouldSkipNewLines()
{
var source = @"{%if true
and
true%}true{%endif%}";
var source = @"{%
if
true
or
false
-%}
true
{%-
endif
%}";

var result = _parser.TryParse(source, out var template, out var errors);

Assert.True(result);
Assert.True(result, errors);
Assert.NotNull(template);
Assert.Null(errors);

Expand Down
2 changes: 1 addition & 1 deletion Fluid/Fluid.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Parlot" Version="0.0.15" />
<PackageReference Include="Parlot" Version="0.0.17" />
<PackageReference Include="Microsoft.Extensions.FileProviders.Abstractions" Version="1.1.1" />
<PackageReference Include="TimeZoneConverter" Version="3.3.0" />
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="all" />
Expand Down
4 changes: 2 additions & 2 deletions Fluid/Parser/TagParsers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public override bool Parse(ParseContext context, ref ParseResult<TagResult> resu
{
if (_skipWhiteSpace)
{
context.Scanner.SkipWhiteSpace();
context.SkipWhiteSpace();
}

var start = context.Scanner.Cursor.Position;
Expand Down Expand Up @@ -96,7 +96,7 @@ public override bool Parse(ParseContext context, ref ParseResult<TagResult> resu
{
if (_skipWhiteSpace)
{
context.Scanner.SkipWhiteSpace();
context.SkipWhiteSpace();
}

var start = context.Scanner.Cursor.Position;
Expand Down

0 comments on commit 0ecb093

Please sign in to comment.