Skip to content

Commit

Permalink
Merge pull request #42 from whistyun/dev-sign
Browse files Browse the repository at this point in the history
signing for strong name. refs #41
  • Loading branch information
whistyun authored Oct 28, 2022
2 parents 10ded99 + 81e61a3 commit e81a0fc
Show file tree
Hide file tree
Showing 40 changed files with 948 additions and 23 deletions.
33 changes: 22 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,39 @@
name: .NET

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:

jobs:
build:

runs-on: windows-2019
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
with:
submodules: 'true'
- name: Setup .NET 3.1
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Setup .NET 5.0
uses: actions/setup-dotnet@v1
with:
dotnet-version: 5.0.x
- name: Install component on windows 2022
shell: pwsh
run: |
Set-Location "C:\Program Files (x86)\Microsoft Visual Studio\Installer\"
$InstallPath = "C:\Program Files\Microsoft Visual Studio\2022\Enterprise"
$componentsToAdd = @(
"Microsoft.Net.Component.4.6.1.SDK"
)
[string]$workloadArgs = $componentsToAdd | ForEach-Object {" --add " + $_}
$Arguments = ('/c', "vs_installer.exe", 'modify', '--installPath', "`"$InstallPath`"",$workloadArgs, '--quiet', '--norestart', '--nocache')
$process = Start-Process -FilePath cmd.exe -ArgumentList $Arguments -Wait -PassThru -WindowStyle Hidden
if ($process.ExitCode -eq 0)
{
Write-Host "components have been successfully added"
}
else
{
Write-Host "components were not installed"
exit 1
}
- name: Clean
run: dotnet clean
- name: Restore
Expand Down
8 changes: 6 additions & 2 deletions MdXaml.Html/MdXaml.Html.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<PackageId>MdXaml.Html</PackageId>
<Version>1.16.0</Version>
<Version>1.16.1</Version>
<Authors>whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand All @@ -16,7 +16,11 @@
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<None Remove="Core\Parsers\TypicalBlockParser.tsv" />
<None Remove="Core\Parsers\TypicalInlineParser.tsv" />
</ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion MdXaml.Plugins/MdXaml.Plugins.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<PackageId>MdXaml.Plugins</PackageId>
<Version>1.16.0</Version>
<Version>1.16.1</Version>
<Authors>whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand All @@ -17,4 +17,8 @@
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
</Project>
6 changes: 5 additions & 1 deletion MdXaml.Svg/MdXaml.Svg.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<PropertyGroup>
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<PackageId>MdXaml.Svg</PackageId>
<Version>1.16.0</Version>
<Version>1.16.1</Version>
<Authors>whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand All @@ -17,6 +17,10 @@
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Svg" Version="3.0.84" />
Expand Down
10 changes: 7 additions & 3 deletions MdXaml/MdXaml.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<PackageId>MdXaml</PackageId>
<Version>1.16.0</Version>
<Version>1.16.1</Version>
<Authors>Bevan Arps(original); whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand All @@ -13,8 +13,12 @@
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageTags>Markdown WPF Xaml FlowDocument</PackageTags>
<Configurations>Debug;Release</Configurations>
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<ItemGroup>
Expand Down
6 changes: 5 additions & 1 deletion MdXaml/MdXamlMigfree.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<TargetFrameworks>netcoreapp3.0;net45;net5.0-windows</TargetFrameworks>
<UseWPF>true</UseWPF>
<PackageId>MdXaml_migfree</PackageId>
<Version>1.16.0</Version>
<Version>1.16.1</Version>
<Authors>Bevan Arps(original); whistyun</Authors>
<Company />
<Description>Markdown XAML processor</Description>
Expand All @@ -18,6 +18,10 @@
<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>..\key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>

<PropertyGroup>
<DefineConstants>MIG_FREE</DefineConstants>
Expand Down
Binary file added key.snk
Binary file not shown.
25 changes: 25 additions & 0 deletions tests/MdXaml.Html.Test/ChangeOutputPathNamer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
using ApprovalTests.Namers;
using System.IO;

namespace MdXamlTest
{
public class ChangeOutputPathNamer : UnitTestFrameworkNamer
{
private string dir;


public override string SourcePath
{
get
{
var basePath = base.SourcePath;
return Path.Combine(basePath, dir);
}
}

public ChangeOutputPathNamer(string dir)
{
this.dir = dir;
}
}
}
2 changes: 1 addition & 1 deletion tests/MdXaml.Html.Test/MdXaml.Html.Test.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFrameworks>netcoreapp3.0;net462;net5.0-windows</TargetFrameworks>

<LangVersion>9</LangVersion>
<Nullable>enable</Nullable>
Expand Down
9 changes: 9 additions & 0 deletions tests/MdXaml.Html.Test/Out/core/UnitTest.Button.approved.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-16"?>
<FlowDocument Style="{x:Null}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Paragraph>
<Button IsEnabled="False">
<FlowDocumentScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Padding="0,0,0,0" Margin="0,0,0,0">
<FlowDocument />
</FlowDocumentScrollViewer>
</Button> <Button IsEnabled="False"><FlowDocumentScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Padding="0,0,0,0" Margin="0,0,0,0"><FlowDocument /></FlowDocumentScrollViewer></Button> <Button IsEnabled="False"><FlowDocumentScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Padding="0,0,0,0" Margin="0,0,0,0"><FlowDocument><Paragraph>some text</Paragraph></FlowDocument></FlowDocumentScrollViewer></Button> <Button IsEnabled="False"><FlowDocumentScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Disabled" Padding="0,0,0,0" Margin="0,0,0,0"><FlowDocument><Section TextAlignment="Center" Tag="Center"><Paragraph Tag="Heading1">title</Paragraph></Section><Paragraph>description1 description2</Paragraph></FlowDocument></FlowDocumentScrollViewer></Button></Paragraph>
</FlowDocument>
26 changes: 26 additions & 0 deletions tests/MdXaml.Html.Test/Out/core/UnitTest.CodeBlock.approved.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?xml version="1.0" encoding="utf-16"?>
<FlowDocument Style="{x:Null}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit" xmlns:icscaed="clr-namespace:ICSharpCode.AvalonEdit.Document;assembly=ICSharpCode.AvalonEdit" xmlns:scmd="clr-namespace:System.ComponentModel.Design;assembly=System.ComponentModel.TypeConverter" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<BlockUIContainer Tag="CodeBlock">
<avalonedit:TextEditor IsReadOnly="True" IsModified="True" HorizontalAlignment="Stretch" xml:space="preserve"><avalonedit:TextEditor.Document><icscaed:TextDocument Text="plain text&#xA;Sub Test()&#xA; Dim A As Long&#xA; Dim B As Integer&#xA;End Sub&#xA;" FileName="{x:Null}"><icscaed:TextDocument.UndoStack><icscaed:UndoStack SizeLimit="2147483647" /></icscaed:TextDocument.UndoStack><icscaed:TextDocument.ServiceProvider><scmd:ServiceContainer /></icscaed:TextDocument.ServiceProvider></icscaed:TextDocument></avalonedit:TextEditor.Document><avalonedit:TextEditor.Options><avalonedit:TextEditorOptions /></avalonedit:TextEditor.Options>plain text
Sub Test()
Dim A As Long
Dim B As Integer
End Sub
</avalonedit:TextEditor>
</BlockUIContainer>
<BlockUIContainer Tag="CodeBlock">
<avalonedit:TextEditor SyntaxHighlighting="Java" IsReadOnly="True" IsModified="True" Tag="java" HorizontalAlignment="Stretch" xml:space="preserve"><avalonedit:TextEditor.Document><icscaed:TextDocument Text="import java.lang.*;&#xA;public class Program {&#xA; public static void main(String[] args) {&#xA; System.out.println(&quot;Hello&quot;);&#xA; } &#xA;}&#xA;" FileName="{x:Null}"><icscaed:TextDocument.UndoStack><icscaed:UndoStack SizeLimit="2147483647" /></icscaed:TextDocument.UndoStack><icscaed:TextDocument.ServiceProvider><scmd:ServiceContainer /></icscaed:TextDocument.ServiceProvider></icscaed:TextDocument></avalonedit:TextEditor.Document><avalonedit:TextEditor.Options><avalonedit:TextEditorOptions /></avalonedit:TextEditor.Options>import java.lang.*;
public class Program {
public static void main(String[] args) {
System.out.println("Hello");
}
}
</avalonedit:TextEditor>
</BlockUIContainer>
<BlockUIContainer Tag="CodeBlock">
<avalonedit:TextEditor IsReadOnly="True" IsModified="True" HorizontalAlignment="Stretch" xml:space="preserve"><avalonedit:TextEditor.Document><icscaed:TextDocument Text="NEMUI&#xA;ONAKASUITA&#xA;SHINDOI&#xA;" FileName="{x:Null}"><icscaed:TextDocument.UndoStack><icscaed:UndoStack SizeLimit="2147483647" /></icscaed:TextDocument.UndoStack><icscaed:TextDocument.ServiceProvider><scmd:ServiceContainer /></icscaed:TextDocument.ServiceProvider></icscaed:TextDocument></avalonedit:TextEditor.Document><avalonedit:TextEditor.Options><avalonedit:TextEditorOptions /></avalonedit:TextEditor.Options>NEMUI
ONAKASUITA
SHINDOI
</avalonedit:TextEditor>
</BlockUIContainer>
</FlowDocument>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-16"?>
<FlowDocument Style="{x:Null}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Paragraph>An <Span Tag="CodeSpan">apple</Span> is an editable fruit produced by an <Span Tag="CodeSpan">apple tree</Span>.</Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<Span Tag="CodeSpan">Apple trees</Span> are caltivated wordwide.</Paragraph>
</FlowDocument>
55 changes: 55 additions & 0 deletions tests/MdXaml.Html.Test/Out/core/UnitTest.Input.approved.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-16"?>
<FlowDocument Style="{x:Null}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<Paragraph>
<TextBox IsReadOnly="True" Width="100" xml:space="preserve"></TextBox> <TextBox IsReadOnly="True" Width="98" xml:space="preserve"></TextBox> <TextBox IsReadOnly="True" Width="100" xml:space="preserve"></TextBox> <TextBox IsReadOnly="True">textbox</TextBox></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button Width="98" IsEnabled="False" xml:space="preserve"></Button> <Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button IsEnabled="False">button</Button></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button Width="98" IsEnabled="False" xml:space="preserve"></Button> <Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button IsEnabled="False">button</Button></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button Width="98" IsEnabled="False" xml:space="preserve"></Button> <Button Width="100" IsEnabled="False" xml:space="preserve"></Button> <Button IsEnabled="False">button</Button></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<RadioButton IsEnabled="False" /> <RadioButton IsChecked="True" IsEnabled="False" /> <RadioButton IsChecked="True" IsEnabled="False" /></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<CheckBox IsEnabled="False" /> <CheckBox IsChecked="True" IsEnabled="False" /> <CheckBox IsChecked="True" IsEnabled="False" /></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<Slider Minimum="0" Maximum="100" Value="50" Width="100" IsEnabled="False" /> <Slider Minimum="0" Maximum="200" Value="50" Width="100" IsEnabled="False" /> <Slider Minimum="50" Maximum="100" Value="90" Width="100" IsEnabled="False" /></Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<TextBox TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True" xml:space="preserve">asasdfasdfsadfasdfasd

sd

df</TextBox>
</Paragraph>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<Paragraph>
<TextBox TextWrapping="Wrap" AcceptsReturn="True" AcceptsTab="True" Width="210" Height="42" xml:space="preserve">afsadfasdfasd

sd

df</TextBox>
</Paragraph>
</FlowDocument>
45 changes: 45 additions & 0 deletions tests/MdXaml.Html.Test/Out/core/UnitTest.List.approved.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-16"?>
<FlowDocument Style="{x:Null}" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
<List MarkerStyle="Decimal">
<ListItem>
<Paragraph>asdf <Bold Tag="Bold">fdsa</Bold> jkl; <Italic Tag="Italic">;lkj</Italic></Paragraph>
</ListItem>
<ListItem>
<Paragraph>1234567</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<RadioButton IsEnabled="False" />ねむい</Paragraph>
</ListItem>
</List>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<List MarkerStyle="Disc">
<ListItem>
<Paragraph>asdf <Bold Tag="Bold">fdsa</Bold> jkl; <Italic Tag="Italic">;lkj</Italic></Paragraph>
</ListItem>
<ListItem>
<Paragraph>1234567</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<RadioButton IsEnabled="False" />ねむい</Paragraph>
</ListItem>
</List>
<BlockUIContainer Tag="RuleSingle">
<Separator />
</BlockUIContainer>
<List MarkerStyle="Decimal" StartIndex="12">
<ListItem>
<Paragraph>asdf <Bold Tag="Bold">fdsa</Bold> jkl; <Italic Tag="Italic">;lkj</Italic></Paragraph>
</ListItem>
<ListItem>
<Paragraph>1234567</Paragraph>
</ListItem>
<ListItem>
<Paragraph>
<RadioButton IsEnabled="False" />ねむい</Paragraph>
</ListItem>
</List>
</FlowDocument>
Loading

0 comments on commit e81a0fc

Please sign in to comment.