Skip to content

Commit

Permalink
Fix text processor incorrectly handled escape characters.
Browse files Browse the repository at this point in the history
  • Loading branch information
BearOffice committed May 11, 2023
1 parent 87cbde9 commit 461a4ff
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
3 changes: 2 additions & 1 deletion BearMarkupLanguage/BearMarkupLanguage.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Version>5.0.10</Version>
<Version>5.0.11</Version>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Authors>Bear</Authors>
<Company>Bear Office</Company>
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
</PropertyGroup>

</Project>
1 change: 0 additions & 1 deletion BearMarkupLanguage/Text/EscapeLevel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ internal enum EscapeLevel
Low,
Middle,
// high below
High,
CollapsedBasic,
BlockKey,
Key
Expand Down
6 changes: 3 additions & 3 deletions BearMarkupLanguage/Text/TextProcesser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ internal static bool IsEscapechar(this char ch, EscapeLevel level)
{
foreach (var (e, l) in _escapeChars)
{
if (e == ch && l <= level)
if (e == ch)
{
if (level <= EscapeLevel.Middle)
if (l <= EscapeLevel.Middle && l <= level)
return true;
else if (l < EscapeLevel.Middle || l == level)
else if (l > EscapeLevel.Middle && l == level)
return true;
}
}
Expand Down

0 comments on commit 461a4ff

Please sign in to comment.