merged from work

This commit is contained in:
2023-05-06 13:23:42 +02:00
parent 11e3a02511
commit 4e8c500fb2
592 changed files with 5577 additions and 71276 deletions

View File

@ -0,0 +1,32 @@
using System;
using System.Net;
namespace Katteker.Changelog
{
public static class ChangelogExtension
{
/// <summary>
/// Format the Changelog as Html compliant file.
/// </summary>
public static string AsHtml(this ChangelogFile value)
{
string result;
switch (value.ChangelogFileType)
{
case ChangelogFileType.TextFile:
var plainText = WebUtility.HtmlEncode(value.Content);
result = plainText?.Replace(Environment.NewLine, "<br />");
break;
case ChangelogFileType.MarkdownFile:
result = new MarkdownSharp.Markdown().Transform(value.Content);
break;
default:
result = value.Content;
break;
}
return result;
}
}
}

View File

@ -0,0 +1,16 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFrameworks>net452;netstandard2.0</TargetFrameworks>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\Katteker\Katteker.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="MarkdownSharp" Version="2.0.5" />
</ItemGroup>
</Project>

View File

@ -0,0 +1,22 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Holger B<>rchers")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Release")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.1.5.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.1.5")]
[assembly: System.Reflection.AssemblyProductAttribute("Katteker")]
[assembly: System.Reflection.AssemblyTitleAttribute("Katteker")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.1.5.0")]
// Generated by the MSBuild WriteCodeFragment class.