Skip to content

Commit

Permalink
Fixed a bug in markup parser
Browse files Browse the repository at this point in the history
The bug caused spaces between xml tags to disapear, if there was no text with them - so `<c f='yellow'>Yellow</c> <c f='green>Green</c>` was printed as `YellowGreen` instead of `Yellow Green`.
  • Loading branch information
Peled-Zohar committed Dec 7, 2019
1 parent 66dead3 commit 8cab35f
Show file tree
Hide file tree
Showing 36 changed files with 70 additions and 26 deletions.
12 changes: 4 additions & 8 deletions ExtendedConsole/ExtendedConsole.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
<LangVersion>7.3</LangVersion>
<PackageReleaseNotes>Changes from previous version:

1. Added a couple of ReadDateTime overloads

2. Added a ReadValues&lt;T&gt; method.

3. Added a ReadLine method.</PackageReleaseNotes>
<Version>1.0.4</Version>
1. Fixed a small bug in markup parser that caused spaces between xml tags to disapear.</PackageReleaseNotes>
<Version>1.0.5</Version>
<PackageIconUrl>https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png</PackageIconUrl>
<ApplicationIcon>extendedconsole.ico</ApplicationIcon>
<AssemblyVersion>1.0.4.0</AssemblyVersion>
<FileVersion>1.0.4.0</FileVersion>
<AssemblyVersion>1.0.5.0</AssemblyVersion>
<FileVersion>1.0.5.0</FileVersion>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
Expand Down
2 changes: 1 addition & 1 deletion ExtendedConsole/Parser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal static TextBuilder ParseMarkeup(string markup)
var textBuilder = new TextBuilder();

markup = $"<ExtendedConsoleMarkup>{markup}</ExtendedConsoleMarkup>";
var element = XElement.Parse(markup);
var element = XElement.Parse(markup, LoadOptions.PreserveWhitespace);
if (element.FirstNode != null)
{
ParseNode(textBuilder, element.FirstNode);
Expand Down
Binary file modified ExtendedConsole/bin/Debug/ExtendedConsole.1.0.4.nupkg
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"ExtendedConsole/1.0.4": {
"ExtendedConsole/1.0.5": {
"dependencies": {
"NETStandard.Library": "2.0.3"
},
Expand All @@ -24,7 +24,7 @@
}
},
"libraries": {
"ExtendedConsole/1.0.4": {
"ExtendedConsole/1.0.5": {
"type": "project",
"serviceable": false,
"sha512": ""
Expand Down
Binary file modified ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.dll
Binary file not shown.
Binary file modified ExtendedConsole/bin/Debug/netstandard2.0/ExtendedConsole.pdb
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"targets": {
".NETStandard,Version=v2.0": {},
".NETStandard,Version=v2.0/": {
"ExtendedConsole/1.0.4": {
"ExtendedConsole/1.0.5": {
"dependencies": {
"NETStandard.Library": "2.0.3"
},
Expand All @@ -24,7 +24,7 @@
}
},
"libraries": {
"ExtendedConsole/1.0.4": {
"ExtendedConsole/1.0.5": {
"type": "project",
"serviceable": false,
"sha512": ""
Expand Down
Binary file modified ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.dll
Binary file not shown.
Binary file modified ExtendedConsole/bin/Release/netstandard2.0/ExtendedConsole.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion ExtendedConsole/obj/Debug/ExtendedConsole.1.0.4.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/Peled-Zohar/ExtendedConsole/blob/master/LICENSE</licenseUrl>
<projectUrl>https://peled-zohar.github.io/ExtendedConsole/</projectUrl>
<iconUrl>https://github.com/Peled-Zohar/ExtendedConsole/blob/master/ExtendedConsole.png</iconUrl>
<iconUrl>https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png</iconUrl>
<description>Provides a set of methods to make your life as a programmer easier when writing a Console application.</description>
<releaseNotes>Changes from previous version:

Expand Down
25 changes: 25 additions & 0 deletions ExtendedConsole/obj/Debug/ExtendedConsole.1.0.5.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>ExtendedConsole</id>
<version>1.0.5</version>
<authors>Zohar Peled</authors>
<owners>Zohar Peled</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/Peled-Zohar/ExtendedConsole/blob/master/LICENSE</licenseUrl>
<projectUrl>https://peled-zohar.github.io/ExtendedConsole/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png</iconUrl>
<description>Provides a set of methods to make your life as a programmer easier when writing a Console application.</description>
<releaseNotes>Changes from previous version:

1. Fixed a small bug in markup parser that caused spaces between xml tags to disapear.</releaseNotes>
<repository url="https://github.com/Peled-Zohar/ExtendedConsole" />
<dependencies>
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
<files>
<file src="C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\ExtendedConsole.dll" target="lib\netstandard2.0\ExtendedConsole.dll" />
<file src="C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\ExtendedConsole.xml" target="lib\netstandard2.0\ExtendedConsole.xml" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Provides a set of methods to make your life as a programmer easier when writing a" +
" Console application.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.4.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.4")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.5.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.5")]
[assembly: System.Reflection.AssemblyProductAttribute("ExtendedConsole")]
[assembly: System.Reflection.AssemblyTitleAttribute("ExtendedConsole")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.4.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.5.0")]
[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")]

// Generated by the MSBuild WriteCodeFragment class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
d4e9b18c81ea3d1b7f0899de54b851c4fdcd1301
3823e8b0ed10f5505ad13c7a328e0aa5a56e3eed
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\Extended
C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\ExtendedConsole.dll
C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\ExtendedConsole.pdb
C:\Development\ExtendedConsole\ExtendedConsole\bin\Debug\netstandard2.0\ExtendedConsole.xml
C:\Development\ExtendedConsole\ExtendedConsole\obj\Debug\netstandard2.0\ExtendedConsole.csprojAssemblyReference.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Debug\netstandard2.0\ExtendedConsole.csproj.CoreCompileInputs.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Debug\netstandard2.0\ExtendedConsole.AssemblyInfoInputs.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Debug\netstandard2.0\ExtendedConsole.AssemblyInfo.cs
Expand Down
Binary file modified ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.dll
Binary file not shown.
Binary file modified ExtendedConsole/obj/Debug/netstandard2.0/ExtendedConsole.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion ExtendedConsole/obj/ExtendedConsole.csproj.nuget.cache
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": 1,
"dgSpecHash": "vgyhUp3vgXNocw33H49OmgGMU7HauO/Fei1GR6uDH5VjQDBA/H3h9zRNbYf3ty5+EfKFT3rFG9pf2UUylxrr/g==",
"dgSpecHash": "+jpn8PeOMdH/lO9P0ukLX4xhBn/OOD/G7ih4ceJiTNmvUX1w12awpOmJUQBYk7kobQu7RzXla9cBwoaS18eTVg==",
"success": true
}
25 changes: 25 additions & 0 deletions ExtendedConsole/obj/Release/ExtendedConsole.1.0.5.nuspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>ExtendedConsole</id>
<version>1.0.5</version>
<authors>Zohar Peled</authors>
<owners>Zohar Peled</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<licenseUrl>https://github.com/Peled-Zohar/ExtendedConsole/blob/master/LICENSE</licenseUrl>
<projectUrl>https://peled-zohar.github.io/ExtendedConsole/</projectUrl>
<iconUrl>https://raw.githubusercontent.com/Peled-Zohar/ExtendedConsole/master/ExtendedConsole.png</iconUrl>
<description>Provides a set of methods to make your life as a programmer easier when writing a Console application.</description>
<releaseNotes>Changes from previous version:

1. Fixed a small bug in markup parser that caused spaces between xml tags to disapear.</releaseNotes>
<repository url="https://github.com/Peled-Zohar/ExtendedConsole" />
<dependencies>
<group targetFramework=".NETStandard2.0" />
</dependencies>
</metadata>
<files>
<file src="C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.dll" target="lib\netstandard2.0\ExtendedConsole.dll" />
<file src="C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.xml" target="lib\netstandard2.0\ExtendedConsole.xml" />
</files>
</package>
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyDescriptionAttribute("Provides a set of methods to make your life as a programmer easier when writing a" +
" Console application.")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.4.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.4")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.5.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.5")]
[assembly: System.Reflection.AssemblyProductAttribute("ExtendedConsole")]
[assembly: System.Reflection.AssemblyTitleAttribute("ExtendedConsole")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.4.0")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.5.0")]
[assembly: System.Resources.NeutralResourcesLanguageAttribute("en")]

// Generated by the MSBuild WriteCodeFragment class.
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
134a40732e75f6a270450fad7d73d53e95c3a822
e541d4be9e131ca819ba3b0d96ad42e340783e60
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\Extend
C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.dll
C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.pdb
C:\Development\ExtendedConsole\ExtendedConsole\bin\Release\netstandard2.0\ExtendedConsole.xml
C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.csprojAssemblyReference.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.csproj.CoreCompileInputs.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.AssemblyInfoInputs.cache
C:\Development\ExtendedConsole\ExtendedConsole\obj\Release\netstandard2.0\ExtendedConsole.AssemblyInfo.cs
Expand Down
Binary file modified ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.dll
Binary file not shown.
Binary file modified ExtendedConsole/obj/Release/netstandard2.0/ExtendedConsole.pdb
Binary file not shown.
2 changes: 1 addition & 1 deletion ExtendedConsole/obj/project.assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@
"C:\\Program Files\\dotnet\\sdk\\NuGetFallbackFolder": {}
},
"project": {
"version": "1.0.4",
"version": "1.0.5",
"restore": {
"projectUniqueName": "C:\\Development\\ExtendedConsole\\ExtendedConsole\\ExtendedConsole.csproj",
"projectName": "ExtendedConsole",
Expand Down
Binary file modified UsingExtendedConsole/bin/Debug/ExtendedConsole.dll
Binary file not shown.
Binary file modified UsingExtendedConsole/bin/Debug/ExtendedConsole.pdb
Binary file not shown.
Binary file modified UsingExtendedConsole/bin/Debug/UsingExtendedConsole.exe
Binary file not shown.
Binary file modified UsingExtendedConsole/bin/Release/ExtendedConsole.dll
Binary file not shown.
Binary file modified UsingExtendedConsole/bin/Release/ExtendedConsole.pdb
Binary file not shown.
Binary file modified UsingExtendedConsole/bin/Release/UsingExtendedConsole.exe
Binary file not shown.
Binary file not shown.
Binary file modified UsingExtendedConsole/obj/Debug/UsingExtendedConsole.exe
Binary file not shown.
Binary file not shown.
Binary file modified UsingExtendedConsole/obj/Release/UsingExtendedConsole.exe
Binary file not shown.

0 comments on commit 8cab35f

Please sign in to comment.