Skip to content

Commit

Permalink
Fixed a bug where a rich text element containing multiple rich text e…
Browse files Browse the repository at this point in the history
…lements would make the parser crash.
  • Loading branch information
Andrei15193 committed Apr 2, 2018
1 parent b34ad84 commit df31919
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 5 deletions.
18 changes: 18 additions & 0 deletions Mup.Tests/CreoleToHtmlTestData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -908,6 +908,24 @@ public static class CreoleToHtmlTestData
new object[]
{
"plain **bold 1*** plain ****bold 2***** plain", "<p>plain <strong>bold 1</strong>* plain **<strong>bold 2</strong>*** plain</p>"
},

new object[]
{
"//this **is** a **test**//",
"<p><em>this <strong>is</strong> a <strong>test</strong></em></p>"
},

new object[]
{
"[[url|this **is** a **test**]]",
"<p><a href=\"url\">this <strong>is</strong> a <strong>test</strong></a></p>"
},

new object[]
{
"//One **activator** can control multiple **effects** or activate one **effect** in multiple different {{{Island States}}}//",
"<p><em>One <strong>activator</strong> can control multiple <strong>effects</strong> or activate one <strong>effect</strong> in multiple different <code>Island States</code></em></p>"
}
};

Expand Down
4 changes: 2 additions & 2 deletions Mup/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
[assembly: AssemblyDescription("Markup Parser (Mup) is an extensible .NET Standard Library (1.0) containing types for parsing and generating HTML from text using the Creole lightweight markup language.")]
[assembly: AssemblyProduct("Mup")]

[assembly: AssemblyVersion("1.1.0.0")]
[assembly: AssemblyFileVersion("1.1.0.0")]
[assembly: AssemblyVersion("1.1.2.0")]
[assembly: AssemblyFileVersion("1.1.2.0")]

[assembly: InternalsVisibleTo("Mup.Tests, PublicKey=00240000048000009400000006020000002400005253413100040000010001002d17cd4dbf3d1a7c18152c73f8d8fcea40eb34e159075478100f355daef09b03e784904d53e6946b9e874ff60cb3e4d7a7658ab2662ffac23560117cb8ec3958b652a0bbac0e52f506e831d5e4f0fa36e5a8d480de1174e7246bbb80ef61724d1a242d34ba9fad1924cb2d8a1e17bb9e3fbb356b7b01b99ceaa4ee55b42992d2")]
[assembly: InternalsVisibleTo("Mup.Tests.Net20, PublicKey=00240000048000009400000006020000002400005253413100040000010001004d7e0c57d1e1da1dc5422a43910c189255b658ed523ca3987db8830319753df83b92472a2dcf731069d7879c9b33aa8d4525683cf8d682a6ec6bc461409c27e0bfa62fac9907f264f08d1ad2551b2cf017c7027ace38ce1a9c0b366779cbd2d2768dfc6177f0176464605adf136d993595dc0563c042f16db7069f4074b31dc6")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ private static void _CreateHierarchy(LinkedList<ElementInfo> elementInfos)
{
var childElementInfoNode = parentElementInfoNode.Next;
var childElementInfo = childElementInfoNode.Value;
parentElementInfo.Children.AddFirst(childElementInfo);
parentElementInfo.Children.AddLast(childElementInfo);
elementInfos.Remove(childElementInfoNode);
}
parentElementInfoNode = parentElementInfoNode.Previous;
Expand Down
2 changes: 1 addition & 1 deletion Mup/Mup.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<SignAssembly>True</SignAssembly>
<AssemblyOriginatorKeyFile>Mup.snk</AssemblyOriginatorKeyFile>
<DelaySign>False</DelaySign>
<Version>1.1.0</Version>
<Version>1.1.2</Version>
<NuspecFile>Mup.nuspec</NuspecFile>
</PropertyGroup>

Expand Down
2 changes: 1 addition & 1 deletion Mup/Mup.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<metadata>
<id>Mup</id>
<title>Mup</title>
<version>1.1.1</version>
<version>1.1.2</version>
<authors>Andrei Fangli</authors>
<owners>Andrei15193</owners>
<projectUrl>http://www.mup-project.net/</projectUrl>
Expand Down

0 comments on commit df31919

Please sign in to comment.