Skip to content

Commit

Permalink
Made updates as per Github issues
Browse files Browse the repository at this point in the history
Fixed - #55

and #54
  • Loading branch information
deanhume committed Jul 24, 2024
1 parent e3700d0 commit 46c4e9e
Show file tree
Hide file tree
Showing 10 changed files with 67 additions and 13 deletions.
4 changes: 4 additions & 0 deletions HtmlMinifier.Tests/Data/GithubIssue54.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<input
type="file"
id="docpicker"
accept="application/pdf,image/*" />
1 change: 1 addition & 0 deletions HtmlMinifier.Tests/Data/GithubIssue54Result.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<input type="file" id="docpicker" accept="application/pdf,image/*" />
3 changes: 3 additions & 0 deletions HtmlMinifier.Tests/DataHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,5 +108,8 @@ public static class DataHelpers

public static string GithubIssue44 = "<h4> <i class=\"fa fa-play-circle-o\"> </i>Xem gì hôm nay?</h4>";
public static string GithubIssue44Result = "<h4><i class=\"fa fa-play-circle-o\"></i>Xem gì hôm nay?</h4>";

public static string GithubIssue54 = "<input\r\n type=\"file\"\r\n id=\"docpicker\"\r\n accept=\"application/pdf,image/*\" />";
public static string GithubIssue54Result = "<input type=\"file\" id=\"docpicker\" accept=\"application/pdf,image/*\" />";
}
}
2 changes: 2 additions & 0 deletions HtmlMinifier.Tests/HtmlMinifier.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
<Content Include="Data\GithubIssue10Result.txt" />
<Content Include="Data\GithubIssue13.txt" />
<Content Include="Data\GithubIssue13Result.txt" />
<Content Include="Data\GithubIssue54.txt" />
<Content Include="Data\GithubIssue54Result.txt" />
<Content Include="Data\LanguageSpecificCharacters.txt" />
<Content Include="Data\LanguageSpecificCharactersResult.txt" />
<Content Include="Data\ModelList.txt" />
Expand Down
13 changes: 13 additions & 0 deletions HtmlMinifier.Tests/MinificationTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -271,5 +271,18 @@ public void GithubIssue44_ShouldReturnCorrectly()
// Assert
Assert.AreEqual(minifiedHtml, expectedResult);
}

[TestMethod]
public void GithubIssue54_ShouldReturnCorrectly()
{
// Arrange
string expectedResult = DataHelpers.GithubIssue54Result;

// Act
string minifiedHtml = StreamReaderExtension.MinifyHtmlCode(DataHelpers.GithubIssue54, noFeatures);

// Assert
Assert.AreEqual(minifiedHtml, expectedResult);
}
}
}
8 changes: 4 additions & 4 deletions HtmlMinifier.Tests/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
using System.Runtime.InteropServices;

[assembly: AssemblyTitle("HtmlMinifier.Tests")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyDescription("Test suite for HtmlMinifier")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HtmlMinifier.Tests")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyCopyright("Copyright © 2022 - 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -16,5 +16,5 @@
[assembly: Guid("206365fc-84f9-49ae-8970-ed31b2b5b42b")]

// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.0.0.0")]
[assembly: AssemblyFileVersion("2.0.0.0")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
14 changes: 12 additions & 2 deletions HtmlMinifier.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29215.179
# Visual Studio Version 17
VisualStudioVersion = 17.10.35027.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HtmlMinifier", "ViewMinifier\HtmlMinifier.csproj", "{339A7163-32AC-413A-BF8F-EB30E8B5C136}"
EndProject
Expand All @@ -10,17 +10,27 @@ EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Debug|Any CPU.Build.0 = Debug|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Debug|x64.ActiveCfg = Debug|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Debug|x64.Build.0 = Debug|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Release|Any CPU.ActiveCfg = Release|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Release|Any CPU.Build.0 = Release|Any CPU
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Release|x64.ActiveCfg = Release|x64
{339A7163-32AC-413A-BF8F-EB30E8B5C136}.Release|x64.Build.0 = Release|x64
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Debug|x64.ActiveCfg = Debug|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Debug|x64.Build.0 = Debug|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Release|Any CPU.Build.0 = Release|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Release|x64.ActiveCfg = Release|Any CPU
{206365FC-84F9-49AE-8970-ED31B2B5B42B}.Release|x64.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
28 changes: 25 additions & 3 deletions ViewMinifier/HtmlMinifier.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<IsWebBootstrapper>false</IsWebBootstrapper>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
<PublishUrl>publish\</PublishUrl>
<Install>true</Install>
<InstallFrom>Disk</InstallFrom>
Expand All @@ -26,9 +29,6 @@
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
<TargetFrameworkProfile />
<NuGetPackageImportStamp>
</NuGetPackageImportStamp>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<PlatformTarget>AnyCPU</PlatformTarget>
Expand All @@ -49,6 +49,28 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\x64\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<NoStdLib>true</NoStdLib>
<DebugType>full</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
<OutputPath>bin\x64\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<Optimize>true</Optimize>
<NoStdLib>true</NoStdLib>
<DebugType>pdbonly</DebugType>
<PlatformTarget>x64</PlatformTarget>
<LangVersion>7.3</LangVersion>
<ErrorReport>prompt</ErrorReport>
<Prefer32Bit>true</Prefer32Bit>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Core" />
Expand Down
1 change: 0 additions & 1 deletion ViewMinifier/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ namespace HtmlMinifier
/// </summary>
public class Program
{

static void Main(string[] args)
{
if (args.Length == 0)
Expand Down
6 changes: 3 additions & 3 deletions ViewMinifier/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HtmlMinifier")]
[assembly: AssemblyCopyright("Copyright Dean Hume © 2014 - 2019")]
[assembly: AssemblyCopyright("Copyright Dean Hume © 2014 - 2024")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// 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("1.9.1.0")]
[assembly: AssemblyFileVersion("1.9.1.0")]
[assembly: AssemblyVersion("1.9.2.0")]
[assembly: AssemblyFileVersion("1.9.2.0")]

0 comments on commit 46c4e9e

Please sign in to comment.