From 29b18e56c768db2d2b5e20c78f64b0b185b36926 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 16:30:35 +0000 Subject: [PATCH 1/9] substitutions in links for inputs --- FSharp.Formatting.sln | 6 +- README.md | 4 +- RELEASE_NOTES.md | 2 +- build.fsx | 4 +- docs/_template.ipynb | 2 +- docs/commandline.md | 2 +- docs/index.md | 2 +- docs/upgrade.md | 4 +- paket.dependencies | 10 +- paket.lock | 243 +++++++-------- .../GenerateModel.fs | 2 +- src/FSharp.Formatting.Literate/Contexts.fs | 5 +- src/FSharp.Formatting.Literate/Formatting.fs | 20 +- src/FSharp.Formatting.Literate/Literate.fs | 102 +++--- .../Transformations.fs | 8 +- .../FsxFormatting.fs | 5 +- .../HtmlFormatting.fs | 5 +- .../LatexFormatting.fs | 5 +- src/FSharp.Formatting.Markdown/Markdown.fs | 52 ++-- .../MarkdownFormatting.fs | 5 +- .../MarkdownUtils.fs | 38 ++- .../PynbFormatting.fs | 5 +- .../BuildCommand.fs | 291 +++++++++++------- .../Options.fs | 2 +- .../Program.fs | 5 +- .../ProjectCracker.fs | 2 +- .../fsdocs-tool.fsproj} | 2 +- .../paket.references | 0 tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs | 2 +- .../CodeFormatTests.fs | 10 +- tests/FSharp.Literate.Tests/EvalTests.fs | 12 +- .../FSharp.Literate.Tests.fsproj | 6 +- tests/FSharp.Literate.Tests/LiterateTests.fs | 82 +++-- tests/FSharp.Literate.Tests/files/simple.fsx | 17 - tests/FSharp.Literate.Tests/files/simple.md | 6 - 35 files changed, 540 insertions(+), 428 deletions(-) rename src/{FSharp.Formatting.CommandTool => fsdocs-tool}/BuildCommand.fs (81%) rename src/{FSharp.Formatting.CommandTool => fsdocs-tool}/Options.fs (96%) rename src/{FSharp.Formatting.CommandTool => fsdocs-tool}/Program.fs (73%) rename src/{FSharp.Formatting.CommandTool => fsdocs-tool}/ProjectCracker.fs (99%) rename src/{FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj => fsdocs-tool/fsdocs-tool.fsproj} (97%) rename src/{FSharp.Formatting.CommandTool => fsdocs-tool}/paket.references (100%) delete mode 100644 tests/FSharp.Literate.Tests/files/simple.fsx delete mode 100644 tests/FSharp.Literate.Tests/files/simple.md diff --git a/FSharp.Formatting.sln b/FSharp.Formatting.sln index 51a5d1c80..71370bbcd 100644 --- a/FSharp.Formatting.sln +++ b/FSharp.Formatting.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.29724.152 +# Visual Studio Version 17 +VisualStudioVersion = 17.0.31825.309 MinimumVisualStudioVersion = 12.0.31101.0 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "project", "project", "{194BD478-0DB5-44F3-A6C2-1FC75D3F3294}" ProjectSection(SolutionItems) = preProject @@ -58,7 +58,7 @@ Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.Literate" EndProject Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FSharp.Formatting.CSharpFormat", "src\FSharp.Formatting.CSharpFormat\FSharp.Formatting.CSharpFormat.csproj", "{9AB3650B-CC24-4404-A175-A573DA928475}" EndProject -Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Formatting.CommandTool", "src\FSharp.Formatting.CommandTool\FSharp.Formatting.CommandTool.fsproj", "{D30F7F2B-A4E3-4A07-A1BD-ED3EB21768F8}" +Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "fsdocs-tool", "src\fsdocs-tool\fsdocs-tool.fsproj", "{D30F7F2B-A4E3-4A07-A1BD-ED3EB21768F8}" EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{8D44B659-E9F7-4CE4-B5DA-D37CDDCD2525}" ProjectSection(SolutionItems) = preProject diff --git a/README.md b/README.md index cd8c0c297..8c8381dac 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ See https://fsprojects.github.io/FSharp.Formatting/ One built you can run the command-line tool to self-build the docs for this directory using dotnet build - src\FSharp.Formatting.CommandTool\bin\Debug\net5.0\fsdocs.exe watch - src\FSharp.Formatting.CommandTool\bin\Debug\net5.0\fsdocs.exe build --clean + src\fsdocs-tool\bin\Debug\net5.0\fsdocs.exe watch + src\fsdocs-tool\bin\Debug\net5.0\fsdocs.exe build --clean ## Maintainer(s) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 1ceb4bcaf..e23c3d704 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -558,7 +558,7 @@ * 2.2.12-beta - Better compatibility for the default font style * 2.3.1-beta - Using new compiler services API, improved docs * 2.3.2-beta - Update to FSharp.Compiler.Service v0.0.10 -* 2.3.3-beta - Update FSharp.Compiler.Service and add FSharp.Formatting.CommandTool package +* 2.3.3-beta - Update FSharp.Compiler.Service and add fsdocs-tool package * 2.3.4-beta - Fix dependency in NuGet package * 2.3.5-beta - Omit non-public members from metadata docs by default * 2.3.6-beta - Update documentation, fixes for Mono compatibility diff --git a/build.fsx b/build.fsx index 1d101f7a0..334ba6012 100644 --- a/build.fsx +++ b/build.fsx @@ -124,7 +124,7 @@ Target.create "GenerateDocs" (fun _ -> + artifactsDir + " --tool-path " + artifactsDir - + " FSharp.Formatting.CommandTool") + + " fsdocs-tool") |> ignore CreateProcess.fromRawCommand @@ -138,7 +138,7 @@ Target.create "GenerateDocs" (fun _ -> |> Proc.run |> ignore // DotNet.exec id "fsdocs" "build --strict --clean --properties Configuration=Release" |> ignore - // DotNet.exec id "tool" "uninstall --local FSharp.Formatting.CommandTool" |> ignore + // DotNet.exec id "tool" "uninstall --local fsdocs-tool" |> ignore Shell.cleanDir ".packages") Target.create "All" ignore diff --git a/docs/_template.ipynb b/docs/_template.ipynb index 203232ceb..8b1378917 100644 --- a/docs/_template.ipynb +++ b/docs/_template.ipynb @@ -1 +1 @@ -{{cells}} + diff --git a/docs/commandline.md b/docs/commandline.md index 4657b46ff..e6afcb7a3 100644 --- a/docs/commandline.md +++ b/docs/commandline.md @@ -8,7 +8,7 @@ index: 1 To use F# Formatting tools via the command line, you can use the `fsdocs` dotnet tool. [lang=text] - dotnet tool install FSharp.Formatting.CommandTool + dotnet tool install fsdocs-tool dotnet fsdocs [command] [options] ## The build command diff --git a/docs/index.md b/docs/index.md index 592db31cd..78bf731c9 100644 --- a/docs/index.md +++ b/docs/index.md @@ -6,7 +6,7 @@ generating API documentation. F# Formatting package is used by this project and To use the tool, install and use the [fsdocs](commandline.html) tool in a typical F# project with F# project files plus markdown and script content in the `docs` directory: - dotnet tool install FSharp.Formatting.CommandTool + dotnet tool install fsdocs-tool dotnet fsdocs build dotnet fsdocs watch diff --git a/docs/upgrade.md b/docs/upgrade.md index 9dc6bd934..c65a4980a 100644 --- a/docs/upgrade.md +++ b/docs/upgrade.md @@ -12,7 +12,7 @@ Here are the typical steps to upgrade a repo based on `ProjectScaffold` to use ` [lang=text] dotnet new tool - dotnet tool install FSharp.Formatting.CommandTool + dotnet tool install fsdocs-tool 2. Delete all of `docs\tools` particularly `docs\tool\generate.fsx`. Keep a copy of any templates for reference as you'll have to copy some bits across to the new template. @@ -54,7 +54,7 @@ Here are the typical steps to upgrade a repo based on `ProjectScaffold` to use ` Sample commands: [lang=text] - dotnet tool install FSharp.Formatting.CommandTool --local + dotnet tool install fsdocs-tool --local git add dotnet-tools.json git rm -fr docs/tools git mv docs/input/* docs diff --git a/paket.dependencies b/paket.dependencies index 5da92b04d..f550002ee 100644 --- a/paket.dependencies +++ b/paket.dependencies @@ -5,12 +5,12 @@ framework: auto-detect storage: none nuget FSharp.Core >= 4.7 lowest_matching:true -nuget FSharp.Compiler.Service 40.0.0 +nuget FSharp.Compiler.Service 41.0.1 nuget CommandLineParser ~> 2.8 -nuget Microsoft.Build.Framework copy_local: false -nuget Microsoft.Build.Tasks.Core copy_local: false -nuget Microsoft.Build.Utilities.Core copy_local: false -nuget Ionide.ProjInfo +nuget Microsoft.Build.Framework +nuget Microsoft.Build.Tasks.Core +nuget Microsoft.Build.Utilities.Core +nuget Ionide.ProjInfo 0.53.1 nuget Ionide.ProjInfo.Sln nuget Newtonsoft.Json nuget Suave diff --git a/paket.lock b/paket.lock index 86d32ceef..2dc4aa384 100644 --- a/paket.lock +++ b/paket.lock @@ -3,11 +3,11 @@ RESTRICTION: || (== net5.0) (== netstandard2.1) NUGET remote: https://api.nuget.org/v3/index.json CommandLineParser (2.8) - FSharp.Compiler.Service (40.0) - FSharp.Core (5.0.2) - Microsoft.Build.Framework (>= 16.9) - Microsoft.Build.Tasks.Core (>= 16.9) - Microsoft.Build.Utilities.Core (>= 16.9) + FSharp.Compiler.Service (41.0.1) + FSharp.Core (6.0.1) + Microsoft.Build.Framework (>= 16.11) + Microsoft.Build.Tasks.Core (>= 16.11) + Microsoft.Build.Utilities.Core (>= 16.11) System.Buffers (>= 4.5.1) System.Collections.Immutable (>= 5.0) System.Diagnostics.Process (>= 4.3) @@ -16,11 +16,12 @@ NUGET System.Linq.Queryable (>= 4.3) System.Memory (>= 4.5.4) System.Net.Requests (>= 4.3) - System.Net.Security (>= 4.3) + System.Net.Security (>= 4.3.1) System.Reflection.Emit (>= 4.3) System.Reflection.Metadata (>= 5.0) System.Reflection.TypeExtensions (>= 4.3) System.Runtime (>= 4.3) + System.Runtime.CompilerServices.Unsafe (>= 5.0) System.Runtime.InteropServices (>= 4.3) System.Runtime.Loader (>= 4.3) System.Security.Claims (>= 4.3) @@ -29,7 +30,7 @@ NUGET System.Threading.Tasks.Parallel (>= 4.3) System.Threading.Thread (>= 4.3) System.Threading.ThreadPool (>= 4.3) - FSharp.Core (5.0.2) + FSharp.Core (6.0.1) FSharp.Data (3.3.3) FSharp.Core (>= 4.3.4) FsUnit (3.9) @@ -42,9 +43,9 @@ NUGET Microsoft.Build (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Locator (>= 1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Ionide.ProjInfo.Sln (0.53.1) - Microsoft.Build (16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) + Ionide.ProjInfo.Sln (0.55) + Microsoft.Build (16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + Microsoft.Build.Framework (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) Microsoft.NET.StringTools (>= 1.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Win32.Registry (>= 4.3) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) System.Collections.Immutable (>= 5.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) @@ -54,12 +55,12 @@ NUGET System.Text.Encoding.CodePages (>= 4.0.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) System.Text.Json (>= 4.7) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build.Framework (16.10) + Microsoft.Build.Framework (16.11) System.Security.Permissions (>= 4.7) Microsoft.Build.Locator (1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build.Tasks.Core (16.10) - Microsoft.Build.Framework (>= 16.10) - Microsoft.Build.Utilities.Core (>= 16.10) + Microsoft.Build.Tasks.Core (16.11) + Microsoft.Build.Framework (>= 16.11) + Microsoft.Build.Utilities.Core (>= 16.11) Microsoft.NET.StringTools (>= 1.0) Microsoft.Win32.Registry (>= 4.3) System.CodeDom (>= 4.4) @@ -70,16 +71,16 @@ NUGET System.Security.Cryptography.Xml (>= 4.7) System.Security.Permissions (>= 4.7) System.Threading.Tasks.Dataflow (>= 4.9) - Microsoft.Build.Utilities.Core (16.10) - Microsoft.Build.Framework (>= 16.10) + Microsoft.Build.Utilities.Core (16.11) + Microsoft.Build.Framework (>= 16.11) Microsoft.NET.StringTools (>= 1.0) Microsoft.Win32.Registry (>= 4.3) System.Collections.Immutable (>= 5.0) System.Configuration.ConfigurationManager (>= 4.7) System.Security.Permissions (>= 4.7) System.Text.Encoding.CodePages (>= 4.0.1) - Microsoft.CodeAnalysis.Analyzers (3.3.2) - Microsoft.CodeAnalysis.Common (3.10) + Microsoft.CodeAnalysis.Analyzers (3.3.3) + Microsoft.CodeAnalysis.Common (3.11) Microsoft.CodeAnalysis.Analyzers (>= 3.3.2) System.Collections.Immutable (>= 5.0) System.Memory (>= 4.5.4) @@ -87,22 +88,22 @@ NUGET System.Runtime.CompilerServices.Unsafe (>= 5.0) System.Text.Encoding.CodePages (>= 4.5.1) System.Threading.Tasks.Extensions (>= 4.5.4) - Microsoft.CodeAnalysis.CSharp (3.10) - Microsoft.CodeAnalysis.Common (3.10) - Microsoft.CodeCoverage (16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.CodeAnalysis.CSharp (3.11) + Microsoft.CodeAnalysis.Common (3.11) + Microsoft.CodeCoverage (17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) Microsoft.NET.StringTools (1.0) System.Memory (>= 4.5.4) System.Runtime.CompilerServices.Unsafe (>= 5.0) - Microsoft.NET.Test.Sdk (16.10) - Microsoft.CodeCoverage (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) - Microsoft.TestPlatform.TestHost (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) - Microsoft.NETCore.Platforms (5.0.2) + Microsoft.NET.Test.Sdk (17.0) + Microsoft.CodeCoverage (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net45)) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.TestPlatform.TestHost (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.NETCore.Platforms (5.0.4) Microsoft.NETCore.Targets (5.0) - Microsoft.TestPlatform.ObjectModel (16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.TestPlatform.ObjectModel (17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) NuGet.Frameworks (>= 5.0) System.Reflection.Metadata (>= 1.6) - Microsoft.TestPlatform.TestHost (16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) - Microsoft.TestPlatform.ObjectModel (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= uap10.0)) + Microsoft.TestPlatform.TestHost (17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) + Microsoft.TestPlatform.ObjectModel (>= 17.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= uap10.0)) Newtonsoft.Json (>= 9.0.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= uap10.0)) Microsoft.Win32.Primitives (4.3) Microsoft.NETCore.Platforms (>= 1.1) @@ -118,7 +119,7 @@ NUGET NETStandard.Library (2.0.3) Microsoft.NETCore.Platforms (>= 1.1) Newtonsoft.Json (13.0.1) - NuGet.Frameworks (5.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= netcoreapp2.1)) + NuGet.Frameworks (5.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp1.0)) (&& (== netstandard2.1) (>= netcoreapp2.1)) NUnit (3.13.2) NETStandard.Library (>= 2.0) NUnit3TestAdapter (4.0) @@ -729,22 +730,26 @@ NUGET FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0) - restriction: >= netstandard2.0 FSharp.Core (4.7.2) - Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: >= net472 + Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) - Microsoft.Build (16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= net472 - Microsoft.NET.StringTools (>= 1.0) - restriction: >= net472 + Microsoft.Build (16.11) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.11) - restriction: || (>= net472) (>= net5.0) + Microsoft.NET.StringTools (>= 1.0) - restriction: || (>= net472) (>= net5.0) Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 - System.Collections.Immutable (>= 5.0) - restriction: >= net472 - System.Configuration.ConfigurationManager (>= 4.7) - restriction: >= net472 + Microsoft.Win32.Registry (>= 4.3) - restriction: >= net5.0 + System.Collections.Immutable (>= 5.0) - restriction: || (>= net472) (>= net5.0) + System.Configuration.ConfigurationManager (>= 4.7) - restriction: || (>= net472) (>= net5.0) System.Memory (>= 4.5.4) - restriction: >= net472 - System.Text.Json (>= 4.7) - restriction: >= net472 - System.Threading.Tasks.Dataflow (>= 4.9) - restriction: >= net472 - Microsoft.Build.Framework (16.10) - restriction: >= netstandard2.0 + System.Reflection.Metadata (>= 1.6) - restriction: >= net5.0 + System.Security.Principal.Windows (>= 4.7) - restriction: >= net5.0 + System.Text.Encoding.CodePages (>= 4.0.1) - restriction: >= net5.0 + System.Text.Json (>= 4.7) - restriction: || (>= net472) (>= net5.0) + System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (>= net472) (>= net5.0) + Microsoft.Build.Framework (16.11) - restriction: >= netstandard2.0 System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.Build.Tasks.Core (16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 + Microsoft.Build.Tasks.Core (16.11) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.11) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 16.11) - restriction: >= netstandard2.0 Microsoft.NET.StringTools (>= 1.0) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: && (< net472) (>= netstandard2.0) @@ -756,8 +761,8 @@ NUGET System.Security.Cryptography.Xml (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Security.Permissions (>= 4.7) - restriction: && (< net472) (>= netstandard2.0) System.Threading.Tasks.Dataflow (>= 4.9) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (16.10) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (16.11) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.11) - restriction: >= netstandard2.0 Microsoft.NET.StringTools (>= 1.0) - restriction: >= netstandard2.0 Microsoft.VisualStudio.Setup.Configuration.Interop (>= 1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (>= 4.3) - restriction: && (< net472) (>= netstandard2.0) @@ -768,114 +773,112 @@ NUGET Microsoft.NET.StringTools (1.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.4) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (5.0.2) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.1)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (>= monotouch) (>= netcoreapp2.1)) (>= netcoreapp2.0) (&& (>= netcoreapp2.1) (>= uap10.1)) (&& (>= netcoreapp2.1) (>= xamarinios)) (&& (>= netcoreapp2.1) (>= xamarinmac)) (&& (>= netcoreapp2.1) (>= xamarintvos)) (&& (>= netcoreapp2.1) (>= xamarinwatchos)) (&& (< netcoreapp3.1) (>= net5.0)) (&& (>= net5.0) (< netstandard1.2)) (&& (>= net5.0) (< netstandard1.3)) (&& (>= net5.0) (< netstandard1.5)) - Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< netcoreapp3.1) (>= net5.0)) (&& (>= net5.0) (< netstandard1.2)) (&& (>= net5.0) (< netstandard1.3)) (&& (>= net5.0) (< netstandard1.5)) + Microsoft.NETCore.Platforms (5.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (>= netcoreapp2.0) (>= xamarinios)) (&& (>= netcoreapp2.0) (>= xamarinmac)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (>= netcoreapp2.1) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) Microsoft.VisualStudio.Setup.Configuration.Interop (1.16.30) - restriction: >= net472 - Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) - System.Buffers (>= 4.5.1) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (>= uap10.1) - System.Security.AccessControl (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net46) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Security.Principal.Windows (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net46) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - Microsoft.Win32.SystemEvents (5.0) - restriction: >= netcoreapp3.0 + Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= monotouch) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Microsoft.Win32.SystemEvents (5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 - MSBuild.StructuredLogger (2.1.507) - restriction: >= netstandard2.0 - Microsoft.Build (>= 16.4) - restriction: >= netstandard2.0 - Microsoft.Build.Framework (>= 16.4) - restriction: >= netstandard2.0 - Microsoft.Build.Tasks.Core (>= 16.4) - restriction: >= netstandard2.0 - Microsoft.Build.Utilities.Core (>= 16.4) - restriction: >= netstandard2.0 + MSBuild.StructuredLogger (2.1.545) - restriction: >= netstandard2.0 + Microsoft.Build (>= 16.10) - restriction: >= netstandard2.0 + Microsoft.Build.Framework (>= 16.10) - restriction: >= netstandard2.0 + Microsoft.Build.Tasks.Core (>= 16.10) - restriction: >= netstandard2.0 + Microsoft.Build.Utilities.Core (>= 16.10) - restriction: >= netstandard2.0 Newtonsoft.Json (13.0.1) - restriction: >= netstandard2.0 - NuGet.Common (5.10) - restriction: >= netstandard2.0 - NuGet.Frameworks (>= 5.10) - restriction: || (>= net45) (>= netstandard2.0) - NuGet.Configuration (5.10) - restriction: >= netstandard2.0 - NuGet.Common (>= 5.10) - restriction: || (>= net45) (>= netstandard2.0) + NuGet.Common (5.11) - restriction: >= netstandard2.0 + NuGet.Frameworks (>= 5.11) - restriction: || (>= net45) (>= netstandard2.0) + NuGet.Configuration (5.11) - restriction: >= netstandard2.0 + NuGet.Common (>= 5.11) - restriction: || (>= net45) (>= netstandard2.0) System.Security.Cryptography.ProtectedData (>= 4.4) - restriction: && (< net45) (>= netstandard2.0) - NuGet.Frameworks (5.10) - restriction: >= netstandard2.0 - NuGet.Packaging (5.10) - restriction: >= netstandard2.0 + NuGet.Frameworks (5.11) - restriction: >= netstandard2.0 + NuGet.Packaging (5.11) - restriction: >= netstandard2.0 Newtonsoft.Json (>= 9.0.1) - restriction: >= netstandard2.0 - NuGet.Configuration (>= 5.10) - restriction: >= netstandard2.0 - NuGet.Versioning (>= 5.10) - restriction: >= netstandard2.0 - System.Security.Cryptography.Cng (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: && (< net472) (>= netstandard2.0) - NuGet.Protocol (5.10) - restriction: >= netstandard2.0 - NuGet.Packaging (>= 5.10) - restriction: >= netstandard2.0 - NuGet.Versioning (5.10) - restriction: >= netstandard2.0 - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net472) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + NuGet.Configuration (>= 5.11) - restriction: >= netstandard2.0 + NuGet.Versioning (>= 5.11) - restriction: >= netstandard2.0 + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + NuGet.Protocol (5.11) - restriction: >= netstandard2.0 + NuGet.Packaging (>= 5.11) - restriction: >= netstandard2.0 + NuGet.Versioning (5.11) - restriction: >= netstandard2.0 + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.CodeDom (5.0) - restriction: && (< net472) (>= netstandard2.0) System.Collections.Immutable (5.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (>= net46) (< netstandard2.0)) (>= net461) (>= uap10.1) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard2.0)) (>= net461) (>= uap10.1) System.Configuration.ConfigurationManager (5.0) - restriction: >= netstandard2.0 + System.Security.Cryptography.ProtectedData (>= 5.0) - restriction: && (< monoandroid) (< net461) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Permissions (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (>= netstandard2.0) (>= xamarintvos) (>= xamarinwatchos) System.Drawing.Common (5.0.2) - restriction: >= netcoreapp3.0 - Microsoft.Win32.SystemEvents (>= 5.0) - restriction: >= netcoreapp2.0 - System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net5.0) (< netstandard1.4)) (&& (>= net5.0) (< netstandard1.6)) - System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Buffers (>= 4.5.1) - restriction: || (>= monoandroid) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net5.0) (>= uap10.1)) (&& (>= net5.0) (>= xamarintvos)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (>= xamarinwatchos)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (>= netstandard2.0) (>= uap10.1)) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (>= monoandroid) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: >= net472 + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Numerics.Vectors (4.5) - restriction: || (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= net5.0)) (>= net472) System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) - System.Reflection.Metadata (5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Collections.Immutable (>= 5.0) - restriction: || (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< net5.0) (>= netstandard2.0)) (&& (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (>= net461) (&& (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) + System.Reflection.Metadata (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Resources.Extensions (5.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) - System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (< netcoreapp3.1) (>= net5.0)) (&& (>= net5.0) (< netstandard1.4)) (&& (>= net5.0) (< netstandard1.6)) - Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= net5.0) - Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (>= net5.0) - System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (&& (>= netcoreapp2.0) (< net5.0)) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) + System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) + Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) + System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net5.0) - System.Security.AccessControl (5.0) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.AccessControl (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= net46) (< netstandard2.0)) (&& (< net46) (>= netstandard1.3) (< netstandard2.0) (< uap10.1)) (&& (< net46) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.0) - System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) (>= net5.0) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) (>= net5.0) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) (>= net5.0) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) (>= net5.0) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (< net472) (>= netstandard2.0)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (&& (>= netcoreapp2.1) (< netstandard2.1)) (>= netcoreapp3.0) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) - System.Formats.Asn1 (>= 5.0) - restriction: >= netcoreapp3.0 + System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) + System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) + System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) - System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net5.0) (< netstandard1.4)) (&& (>= net5.0) (< netstandard1.6)) + System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) System.Security.Cryptography.Pkcs (5.0.1) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Buffers (>= 4.5.1) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) - System.Formats.Asn1 (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (>= netcoreapp3.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (>= uap10.1) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac)) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (&& (>= netcoreapp2.1) (< netstandard2.1)) (>= netcoreapp3.0) - System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net5.0) (< netstandard1.4)) (&& (>= net5.0) (< netstandard1.6)) - System.Security.Cryptography.ProtectedData (5.0) - restriction: && (< net45) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) + System.Buffers (>= 4.5.1) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Formats.Asn1 (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (>= monotouch) (>= netcoreapp3.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) + System.Security.Cryptography.ProtectedData (5.0) - restriction: || (&& (< monoandroid) (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= netstandard2.0)) (&& (< net461) (>= net472)) System.Security.Cryptography.Xml (5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net461) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) + System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net461) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net461) (>= netstandard2.0)) (>= netcoreapp2.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Permissions (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (>= netstandard2.0) (>= xamarintvos) (>= xamarinwatchos) System.Security.Permissions (5.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 5.0) - restriction: || (>= net461) (>= netstandard2.0) System.Windows.Extensions (>= 5.0) - restriction: >= netcoreapp3.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= netstandard2.0)) (>= netcoreapp2.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) - System.Text.Encoding.CodePages (5.0) - restriction: && (< net472) (>= netstandard2.0) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< net5.0)) - System.Text.Encodings.Web (5.0.1) - restriction: >= net472 + System.Text.Encoding.CodePages (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net5.0) + System.Text.Encodings.Web (5.0.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) System.Memory (>= 4.5.4) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (>= uap10.1) - System.Text.Json (5.0.2) - restriction: >= net472 - Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Buffers (>= 4.5.1) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (>= uap10.1) - System.Numerics.Vectors (>= 4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< net5.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Text.Encodings.Web (>= 5.0.1) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) (&& (>= netcoreapp3.0) (< net5.0)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (>= uap10.1) + System.Text.Json (5.0.2) - restriction: || (>= net472) (>= net5.0) + Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) + System.Numerics.Vectors (>= 4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Text.Encodings.Web (>= 5.0.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) System.ValueTuple (>= 4.5) - restriction: >= net461 System.Threading.Tasks.Dataflow (5.0) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) - System.ValueTuple (4.5) - restriction: || (&& (>= net45) (>= netstandard2.0)) (>= net472) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (>= uap10.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) + System.ValueTuple (4.5) - restriction: || (&& (>= net45) (>= netstandard2.0)) (&& (>= net461) (>= net5.0)) (>= net472) System.Windows.Extensions (5.0) - restriction: >= netcoreapp3.0 System.Drawing.Common (>= 5.0) - restriction: >= netcoreapp3.0 diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index 52c6718bb..e5252869a 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -1470,7 +1470,7 @@ module internal SymbolReader = customOpName.IsSome || isItemIndexer || not v.IsMember - || PrettyNaming.IsOperatorName v.CompiledName + || PrettyNaming.IsMangledOpName v.CompiledName || Char.IsLower(v.DisplayName.[0]) let fullArgUsage = diff --git a/src/FSharp.Formatting.Literate/Contexts.fs b/src/FSharp.Formatting.Literate/Contexts.fs index a82e7906d..facffe9fd 100644 --- a/src/FSharp.Formatting.Literate/Contexts.fs +++ b/src/FSharp.Formatting.Literate/Contexts.fs @@ -102,8 +102,11 @@ type internal LiterateProcessingContext = /// The output format OutputKind: OutputKind + /// Helper to resolve URL referenecs in markdown, e.g. 'index.md' --> 'index.html' when doing HTML output + MarkdownDirectLinkResolver: string -> string option + /// Helper to resolve `cref:T:TypeName` references in markdown - ResolveApiDocReference: string -> (string * string) option + CodeReferenceResolver: string -> (string * string) option /// Conditional defines for the processing ConditionalDefines: string list diff --git a/src/FSharp.Formatting.Literate/Formatting.fs b/src/FSharp.Formatting.Literate/Formatting.fs index a23f5ee91..a0396dd81 100644 --- a/src/FSharp.Formatting.Literate/Formatting.fs +++ b/src/FSharp.Formatting.Literate/Formatting.fs @@ -9,17 +9,17 @@ open FSharp.Formatting.Templating module internal Formatting = /// Format document with the specified output kind - let format (doc: MarkdownDocument) generateAnchors outputKind substitutions crefResolver = + let format (doc: MarkdownDocument) generateAnchors outputKind substitutions crefResolver mdlinkResolver = match outputKind with - | OutputKind.Fsx -> Markdown.ToFsx(doc, substitutions = substitutions, crefResolver = crefResolver) - | OutputKind.Md -> Markdown.ToMd(doc, substitutions = substitutions, crefResolver = crefResolver) - | OutputKind.Pynb -> Markdown.ToPynb(doc, substitutions = substitutions, crefResolver = crefResolver) - | OutputKind.Latex -> Markdown.ToLatex(doc, substitutions = substitutions, crefResolver = crefResolver) + | OutputKind.Fsx -> Markdown.ToFsx(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) + | OutputKind.Md -> Markdown.ToMd(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) + | OutputKind.Pynb -> Markdown.ToPynb(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) + | OutputKind.Latex -> Markdown.ToLatex(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) | OutputKind.Html -> let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - HtmlFormatting.formatMarkdown + HtmlFormatting.formatAsHtml wr generateAnchors true @@ -27,6 +27,7 @@ module internal Formatting = substitutions System.Environment.NewLine crefResolver + mdlinkResolver doc.Paragraphs sb.ToString() @@ -42,7 +43,7 @@ module internal Formatting = | OutputKind.Latex -> let doc = MarkdownDocument([ Span(text, r) ], dict []) - Some(format doc generateAnchors outputKind [] (fun _ -> None)) + Some(format doc generateAnchors outputKind [] (fun _ -> None) (fun _ -> None)) | _ -> None | _ -> None) @@ -123,7 +124,7 @@ module internal Formatting = let doc = getSourceDocument doc |> Transformations.replaceLiterateParagraphs ctx - let source = format doc.MarkdownDocument ctx.GenerateHeaderAnchors ctx.OutputKind [] (fun _ -> None) + let source = format doc.MarkdownDocument ctx.GenerateHeaderAnchors ctx.OutputKind [] (fun _ -> None) (fun _ -> None) [ ParamKeys.``fsdocs-source-filename``, relativeSourceFileName ParamKeys.``fsdocs-source-basename``, relativeSourceFileBaseName @@ -151,7 +152,8 @@ module internal Formatting = ctx.GenerateHeaderAnchors ctx.OutputKind substitutions0 - ctx.ResolveApiDocReference + ctx.CodeReferenceResolver + ctx.MarkdownDirectLinkResolver let tipsHtml = doc.FormattedTips diff --git a/src/FSharp.Formatting.Literate/Literate.fs b/src/FSharp.Formatting.Literate/Literate.fs index 3dff6be06..add51e83f 100644 --- a/src/FSharp.Formatting.Literate/Literate.fs +++ b/src/FSharp.Formatting.Literate/Literate.fs @@ -21,7 +21,7 @@ open FSharp.Formatting.Templating type Literate private () = /// Build default options context for formatting literate document - static let formattingContext + static let makeFormattingContext (outputKind: OutputKind) prefix lineNumbers @@ -29,6 +29,7 @@ type Literate private () = substitutions tokenKindToCss crefResolver + mdlinkResolver = let defines = [ outputKind.Extension ] @@ -39,8 +40,8 @@ type Literate private () = OutputKind = outputKind GenerateHeaderAnchors = defaultArg generateAnchors false TokenKindToCss = tokenKindToCss - ResolveApiDocReference = crefResolver } - + MarkdownDirectLinkResolver = mdlinkResolver + CodeReferenceResolver = crefResolver } /// Lookup a specified key in a dictionary, possibly /// ignoring newlines or spaces in the key. @@ -242,12 +243,14 @@ type Literate private () = ?generateAnchors, ?tokenKindToCss, ?substitutions, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = formattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver + let ctx = makeFormattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc @@ -257,7 +260,7 @@ type Literate private () = let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - HtmlFormatting.formatMarkdown + HtmlFormatting.formatAsHtml wr ctx.GenerateHeaderAnchors true @@ -265,6 +268,7 @@ type Literate private () = substitutions Environment.NewLine crefResolver + mdlinkResolver doc.Paragraphs sb.ToString() @@ -279,12 +283,14 @@ type Literate private () = ?generateAnchors, ?tokenKindToCss, ?substitutions, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = formattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver + let ctx = makeFormattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc @@ -292,7 +298,7 @@ type Literate private () = let doc = MarkdownDocument(paragraphs) - HtmlFormatting.formatMarkdown + HtmlFormatting.formatAsHtml writer ctx.GenerateHeaderAnchors true @@ -300,6 +306,7 @@ type Literate private () = substitutions Environment.NewLine crefResolver + mdlinkResolver doc.Paragraphs /// Format the literate document as Latex without using a template @@ -310,14 +317,13 @@ type Literate private () = ?lineNumbers, ?generateAnchors, ?substitutions, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let crefResolver = defaultArg crefResolver (fun _ -> None) - - let ctx = formattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver - + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + let ctx = makeFormattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc - Markdown.ToLatex(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), ?substitutions = substitutions) /// Write the literate document as Latex without using a template @@ -329,34 +335,29 @@ type Literate private () = ?lineNumbers, ?generateAnchors, ?substitutions, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let crefResolver = defaultArg crefResolver (fun _ -> None) - - let ctx = formattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver - + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + let ctx = makeFormattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc - Markdown.WriteLatex(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), writer, ?substitutions = substitutions) /// Formate the literate document as an iPython notebook - static member ToPynb(doc: LiterateDocument, ?substitutions, ?crefResolver) = + static member ToPynb(doc: LiterateDocument, ?substitutions, ?crefResolver, ?mdlinkResolver) = let crefResolver = defaultArg crefResolver (fun _ -> None) - - let ctx = formattingContext OutputKind.Pynb None None None substitutions None crefResolver - + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + let ctx = makeFormattingContext OutputKind.Pynb None None None substitutions None crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc - Markdown.ToPynb(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), ?substitutions = substitutions) /// Formate the literate document as an .fsx script - static member ToFsx(doc: LiterateDocument, ?substitutions, ?crefResolver) = + static member ToFsx(doc: LiterateDocument, ?substitutions, ?crefResolver, ?mdlinkResolver) = let crefResolver = defaultArg crefResolver (fun _ -> None) - - let ctx = formattingContext OutputKind.Fsx None None None substitutions None crefResolver - + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + let ctx = makeFormattingContext OutputKind.Fsx None None None substitutions None crefResolver mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc - Markdown.ToFsx(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), ?substitutions = substitutions) /// Replace literate paragraphs with plain paragraphs @@ -368,12 +369,14 @@ type Literate private () = ?lineNumbers, ?generateAnchors, ?tokenKindToCss, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html - let ctx = formattingContext outputKind prefix lineNumbers generateAnchors None tokenKindToCss crefResolver + let ctx = makeFormattingContext outputKind prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver Transformations.replaceLiterateParagraphs ctx doc @@ -395,10 +398,12 @@ type Literate private () = ?imageSaver, ?rootInputFolder, ?crefResolver, + ?mdlinkResolver, ?parseOptions ) = let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html let parseOptions = defaultArg parseOptions MarkdownParseOptions.AllowYamlFrontMatter @@ -409,7 +414,7 @@ type Literate private () = | OutputKind.Pynb -> parseOptions ||| MarkdownParseOptions.ParseCodeAsOther - ||| MarkdownParseOptions.ParseNonCodeAsOther + //||| MarkdownParseOptions.ParseNonCodeAsOther | _ -> parseOptions let doc = @@ -423,7 +428,7 @@ type Literate private () = ) let ctx = - formattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver + makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver mdlinkResolver let doc = customizeDoc customizeDocument ctx doc let doc = downloadImagesForDoc imageSaver doc @@ -448,18 +453,18 @@ type Literate private () = ?tokenKindToCss, ?imageSaver, ?rootInputFolder, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let parseOptions = match outputKind with | Some OutputKind.Fsx - | Some OutputKind.Pynb -> - MarkdownParseOptions.ParseCodeAsOther - ||| MarkdownParseOptions.ParseNonCodeAsOther + | Some OutputKind.Pynb -> MarkdownParseOptions.ParseCodeAsOther | _ -> MarkdownParseOptions.None let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html let doc = @@ -474,7 +479,7 @@ type Literate private () = ) let ctx = - formattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver + makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver mdlinkResolver let doc = customizeDoc customizeDocument ctx doc let doc = downloadImagesForDoc imageSaver doc @@ -491,15 +496,14 @@ type Literate private () = ?lineNumbers, ?generateAnchors, ?substitutions, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html - - let ctx = formattingContext outputKind prefix lineNumbers generateAnchors substitutions None crefResolver - + let ctx = makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions None crefResolver mdlinkResolver let res = Formatting.transformDocument doc output ctx - SimpleTemplating.UseFileAsSimpleTemplate(res.Substitutions, template, output) /// Convert a markdown file into HTML or another output kind @@ -517,7 +521,8 @@ type Literate private () = ?substitutions, ?generateAnchors, ?rootInputFolder, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let outputKind = defaultArg outputKind OutputKind.Html @@ -536,7 +541,8 @@ type Literate private () = ?generateAnchors = generateAnchors, ?substitutions = substitutions (* ?customizeDocument=customizeDocument, *) , ?rootInputFolder = rootInputFolder, - ?crefResolver = crefResolver + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver ) SimpleTemplating.UseFileAsSimpleTemplate(res.Substitutions, template, output) @@ -562,7 +568,8 @@ type Literate private () = ?substitutions, ?generateAnchors, ?rootInputFolder, - ?crefResolver + ?crefResolver, + ?mdlinkResolver ) = let outputKind = defaultArg outputKind OutputKind.Html @@ -582,7 +589,8 @@ type Literate private () = ?substitutions = substitutions (* ?customizeDocument=customizeDocument, *) , ?fsiEvaluator = fsiEvaluator, ?rootInputFolder = rootInputFolder, - ?crefResolver = crefResolver + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver ) SimpleTemplating.UseFileAsSimpleTemplate(res.Substitutions, template, output) diff --git a/src/FSharp.Formatting.Literate/Transformations.fs b/src/FSharp.Formatting.Literate/Transformations.fs index 6c841fa28..297b7cc20 100644 --- a/src/FSharp.Formatting.Literate/Transformations.fs +++ b/src/FSharp.Formatting.Literate/Transformations.fs @@ -201,7 +201,6 @@ module internal Transformations = loop - /// Given Markdown document, add a number using the given index to all indirect /// references. For example, [article][ref] becomes [article][ref] [1](#rfxyz) let replaceReferences (refIndex: IDictionary) = @@ -230,10 +229,9 @@ module internal Transformations = loop - /// Given all links defined in the Markdown document and a list of all links /// that are accessed somewhere from the document, generate References paragraph - let generateRefParagraphs (definedLinks: IDictionary<_, string * string option>) refs = + let generateReferenceParagraphs (definedLinks: IDictionary<_, string * string option>) refs = // For all unique references in the document, // get the link & title from definitions let refs = @@ -289,7 +287,7 @@ module internal Transformations = if references then let refs = doc.Paragraphs |> Seq.collect collectReferences - let refPars, refLookup = generateRefParagraphs doc.DefinedLinks refs + let refPars, refLookup = generateReferenceParagraphs doc.DefinedLinks refs let newDoc = doc.Paragraphs |> List.choose (replaceReferences refLookup) @@ -457,7 +455,7 @@ module internal Transformations = | _ -> () ] - /// Replace all sporiginalLineecial 'LiterateParagraph' elements recursively using the given lookup dictionary + /// Replace all special 'LiterateParagraph' elements recursively using the given lookup dictionary let rec replaceLiterateParagraph (ctx: LiterateProcessingContext) (formatted: IDictionary<_, _>) para = match para with | MarkdownPatterns.LiterateParagraph (special) -> diff --git a/src/FSharp.Formatting.Markdown/FsxFormatting.fs b/src/FSharp.Formatting.Markdown/FsxFormatting.fs index 7fc69edb0..f06654c68 100644 --- a/src/FSharp.Formatting.Markdown/FsxFormatting.fs +++ b/src/FSharp.Formatting.Markdown/FsxFormatting.fs @@ -41,12 +41,13 @@ let rec formatParagraphs ctx paragraphs = let cells = cell :: others cells -let formatAsFsx links substitutions newline crefResolver paragraphs = +let formatAsFsx links substitutions newline crefResolver mdlinkResolver paragraphs = let ctx = { Links = links Substitutions = substitutions Newline = newline - ResolveApiDocReference = crefResolver + CodeReferenceResolver = crefResolver + MarkdownDirectLinkResolver = mdlinkResolver DefineSymbol = "FSX" } let paragraphs = applySubstitutionsInMarkdown ctx paragraphs diff --git a/src/FSharp.Formatting.Markdown/HtmlFormatting.fs b/src/FSharp.Formatting.Markdown/HtmlFormatting.fs index 318a1291a..bf32d12d5 100644 --- a/src/FSharp.Formatting.Markdown/HtmlFormatting.fs +++ b/src/FSharp.Formatting.Markdown/HtmlFormatting.fs @@ -341,12 +341,13 @@ and internal formatParagraphs ctx paragraphs = /// Format Markdown document and write the result to /// a specified TextWriter. Parameters specify newline character /// and a dictionary with link keys defined in the document. -let formatMarkdown writer generateAnchors wrap links substitutions newline crefResolver paragraphs = +let formatAsHtml writer generateAnchors wrap links substitutions newline crefResolver mdlinkResolver paragraphs = let ctx = { Links = links Substitutions = substitutions Newline = newline - ResolveApiDocReference = crefResolver + CodeReferenceResolver = crefResolver + MarkdownDirectLinkResolver = mdlinkResolver DefineSymbol = "HTML" } let paragraphs = applySubstitutionsInMarkdown ctx paragraphs diff --git a/src/FSharp.Formatting.Markdown/LatexFormatting.fs b/src/FSharp.Formatting.Markdown/LatexFormatting.fs index 8a3abf383..6fc078ebd 100644 --- a/src/FSharp.Formatting.Markdown/LatexFormatting.fs +++ b/src/FSharp.Formatting.Markdown/LatexFormatting.fs @@ -260,12 +260,13 @@ and formatParagraphs ctx paragraphs = /// Format Markdown document and write the result to /// a specified TextWriter. Parameters specify newline character /// and a dictionary with link keys defined in the document. -let formatMarkdown writer links replacements newline crefResolver paragraphs = +let formatAsLatex writer links replacements newline crefResolver mdlinkResolver paragraphs = let ctx = { Links = links Substitutions = replacements Newline = newline - ResolveApiDocReference = crefResolver + CodeReferenceResolver = crefResolver + MarkdownDirectLinkResolver = mdlinkResolver DefineSymbol = "LATEX" } let paragraphs = applySubstitutionsInMarkdown ctx paragraphs diff --git a/src/FSharp.Formatting.Markdown/Markdown.fs b/src/FSharp.Formatting.Markdown/Markdown.fs index 32104f339..5556201c7 100644 --- a/src/FSharp.Formatting.Markdown/Markdown.fs +++ b/src/FSharp.Formatting.Markdown/Markdown.fs @@ -82,12 +82,13 @@ type Markdown internal () = /// Transform the provided MarkdownDocument into HTML /// format and write the result to a given writer. - static member WriteHtml(doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver) = + static member WriteHtml(doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let newline = defaultArg newline Environment.NewLine let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - HtmlFormatting.formatMarkdown + HtmlFormatting.formatAsHtml writer false false @@ -95,11 +96,12 @@ type Markdown internal () = substitutions newline crefResolver + mdlinkResolver doc.Paragraphs /// Transform Markdown text into HTML format. The result /// will be written to the provided TextWriter. - static member WriteHtml(markdownText: string, writer: TextWriter, ?newline, ?substitutions, ?crefResolver) = + static member WriteHtml(markdownText: string, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) Markdown.WriteHtml( @@ -107,35 +109,37 @@ type Markdown internal () = writer, ?newline = newline, ?substitutions = substitutions, - ?crefResolver = crefResolver + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver ) /// Transform the provided MarkdownDocument into HTML /// format and return the result as a string. - static member ToHtml(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver) = + static member ToHtml(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - Markdown.WriteHtml(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver) + Markdown.WriteHtml(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver=mdlinkResolver) sb.ToString() /// Transform Markdown document into HTML format. /// The result will be returned as a string. - static member ToHtml(markdownText: string, ?newline, ?substitutions, ?crefResolver) = + static member ToHtml(markdownText: string, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) - Markdown.ToHtml(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver) + Markdown.ToHtml(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver=mdlinkResolver) /// Transform the provided MarkdownDocument into LaTeX /// format and write the result to a given writer. - static member WriteLatex(doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver) = + static member WriteLatex(doc: MarkdownDocument, writer, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let newline = defaultArg newline Environment.NewLine let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) - LatexFormatting.formatMarkdown writer doc.DefinedLinks substitutions newline crefResolver doc.Paragraphs + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + LatexFormatting.formatAsLatex writer doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs /// Transform Markdown document into LaTeX format. The result /// will be written to the provided TextWriter. - static member WriteLatex(markdownText, writer: TextWriter, ?newline, ?substitutions, ?crefResolver) = + static member WriteLatex(markdownText, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) Markdown.WriteLatex( @@ -143,40 +147,44 @@ type Markdown internal () = writer, ?newline = newline, ?substitutions = substitutions, - ?crefResolver = crefResolver + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver ) /// Transform the provided MarkdownDocument into LaTeX /// format and return the result as a string. - static member ToLatex(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver) = + static member ToLatex(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - Markdown.WriteLatex(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver) + Markdown.WriteLatex(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver = mdlinkResolver) sb.ToString() /// Transform Markdown text into LaTeX format. The result will be returned as a string. - static member ToLatex(markdownText: string, ?newline, ?substitutions, ?crefResolver) = + static member ToLatex(markdownText: string, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) - Markdown.ToLatex(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver) + Markdown.ToLatex(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver = mdlinkResolver) /// Transform the provided MarkdownDocument into Pynb and return the result as a string. - static member ToPynb(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver) = + static member ToPynb(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let newline = defaultArg newline Environment.NewLine let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) - PynbFormatting.formatAsPynb doc.DefinedLinks substitutions newline crefResolver doc.Paragraphs + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + PynbFormatting.formatAsPynb doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs /// Transform the provided MarkdownDocument into Fsx and return the result as a string. - static member ToFsx(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver) = + static member ToFsx(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let newline = defaultArg newline Environment.NewLine let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) - FsxFormatting.formatAsFsx doc.DefinedLinks substitutions newline crefResolver doc.Paragraphs + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + FsxFormatting.formatAsFsx doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs /// Transform the provided MarkdownDocument into Md and return the result as a string. - static member ToMd(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver) = + static member ToMd(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let newline = defaultArg newline Environment.NewLine let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) - MarkdownFormatting.formatAsMd doc.DefinedLinks substitutions newline crefResolver doc.Paragraphs + let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) + MarkdownFormatting.formatAsMarkdown doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs diff --git a/src/FSharp.Formatting.Markdown/MarkdownFormatting.fs b/src/FSharp.Formatting.Markdown/MarkdownFormatting.fs index 38835ce10..3459c3cf0 100644 --- a/src/FSharp.Formatting.Markdown/MarkdownFormatting.fs +++ b/src/FSharp.Formatting.Markdown/MarkdownFormatting.fs @@ -9,12 +9,13 @@ open MarkdownUtils let rec formatParagraphs ctx (paragraphs: MarkdownParagraph list) = paragraphs |> Seq.collect (formatParagraph ctx) -let formatAsMd links replacements newline crefResolver paragraphs = +let formatAsMarkdown links replacements newline crefResolver mdlinkResolver paragraphs = let ctx = { Links = links Substitutions = replacements Newline = newline - ResolveApiDocReference = crefResolver + CodeReferenceResolver = crefResolver + MarkdownDirectLinkResolver = mdlinkResolver DefineSymbol = "MD" } let paragraphs = applySubstitutionsInMarkdown ctx paragraphs diff --git a/src/FSharp.Formatting.Markdown/MarkdownUtils.fs b/src/FSharp.Formatting.Markdown/MarkdownUtils.fs index 77143fb76..dd5421405 100644 --- a/src/FSharp.Formatting.Markdown/MarkdownUtils.fs +++ b/src/FSharp.Formatting.Markdown/MarkdownUtils.fs @@ -76,7 +76,9 @@ module internal MarkdownUtils = /// Additional replacements to be made in content Substitutions: Substitutions /// Helper to resolve `cref:T:TypeName` references in markdown - ResolveApiDocReference: string -> (string * string) option + CodeReferenceResolver: string -> (string * string) option + /// Helper to resolve `[foo](file.md)` references in markdown (where file.md is producing file.fsx) + MarkdownDirectLinkResolver: string -> string option DefineSymbol: string } /// Format a MarkdownSpan @@ -215,28 +217,34 @@ module internal MarkdownUtils = SimpleTemplating.ApplySubstitutionsInText ctx.Substitutions text let applyCodeReferenceResolver ctx (code, range) = - match ctx.ResolveApiDocReference code with + match ctx.CodeReferenceResolver code with | None -> InlineCode(code, range) | Some (niceName, link) -> DirectLink([ Literal(niceName, range) ], link, None, range) - let mapText (f, _) text = f text - let mapInlineCode (_, f) (code, range) = f (code, range) + let applyDirectLinkResolver ctx link = + match ctx.MarkdownDirectLinkResolver link with + | None -> link + | Some newLink -> newLink - let rec mapSpans f (md: MarkdownSpans) = + let mapText (f, _, _) text = f text + let mapInlineCode (_, f, _) (code, range) = f (code, range) + let mapDirectLink (fText, _, fLink) text = fLink (fText text) + + let rec mapSpans fs (md: MarkdownSpans) = md |> List.map (function - | Literal (text, range) -> Literal(mapText f text, range) - | Strong (spans, range) -> Strong(mapSpans f spans, range) - | Emphasis (spans, range) -> Emphasis(mapSpans f spans, range) - | AnchorLink (link, range) -> AnchorLink(mapText f link, range) + | Literal (text, range) -> Literal(mapText fs text, range) + | Strong (spans, range) -> Strong(mapSpans fs spans, range) + | Emphasis (spans, range) -> Emphasis(mapSpans fs spans, range) + | AnchorLink (link, range) -> AnchorLink(mapText fs link, range) | DirectLink (spans, link, title, range) -> - DirectLink(mapSpans f spans, mapText f link, Option.map (mapText f) title, range) - | IndirectLink (spans, original, key, range) -> IndirectLink(mapSpans f spans, original, key, range) + DirectLink(mapSpans fs spans, mapDirectLink fs link, Option.map (mapText fs) title, range) + | IndirectLink (spans, original, key, range) -> IndirectLink(mapSpans fs spans, original, key, range) | DirectImage (body, link, title, range) -> - DirectImage(mapText f body, mapText f link, Option.map (mapText f) title, range) - | IndirectImage (body, original, key, range) -> IndirectImage(mapText f body, original, key, range) + DirectImage(mapText fs body, mapText fs link, Option.map (mapText fs) title, range) + | IndirectImage (body, original, key, range) -> IndirectImage(mapText fs body, original, key, range) | HardLineBreak (range) -> HardLineBreak(range) - | InlineCode (code, range) -> mapInlineCode f (code, range) + | InlineCode (code, range) -> mapInlineCode fs (code, range) // NOTE: substitutions not applied to Latex math, embedded spans or inline code | LatexInlineMath (code, range) -> LatexInlineMath(code, range) @@ -275,4 +283,4 @@ module internal MarkdownUtils = EmbedParagraphs(customParagraphs, range)) let applySubstitutionsInMarkdown ctx md = - mapParagraphs (applySubstitutionsInText ctx, applyCodeReferenceResolver ctx) md + mapParagraphs (applySubstitutionsInText ctx, applyCodeReferenceResolver ctx, applyDirectLinkResolver ctx) md diff --git a/src/FSharp.Formatting.Markdown/PynbFormatting.fs b/src/FSharp.Formatting.Markdown/PynbFormatting.fs index 0c3a86615..978bd59fd 100644 --- a/src/FSharp.Formatting.Markdown/PynbFormatting.fs +++ b/src/FSharp.Formatting.Markdown/PynbFormatting.fs @@ -35,12 +35,13 @@ let rec formatParagraphs ctx paragraphs = let cells = cell :: others cells -let formatAsPynb links replacements newline crefResolver paragraphs = +let formatAsPynb links replacements newline crefResolver mdlinkResolver paragraphs = let ctx = { Links = links Substitutions = replacements Newline = newline - ResolveApiDocReference = crefResolver + CodeReferenceResolver = crefResolver + MarkdownDirectLinkResolver = mdlinkResolver DefineSymbol = "IPYNB" } let paragraphs = applySubstitutionsInMarkdown ctx paragraphs diff --git a/src/FSharp.Formatting.CommandTool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs similarity index 81% rename from src/FSharp.Formatting.CommandTool/BuildCommand.fs rename to src/fsdocs-tool/BuildCommand.fs index ba27b5740..3357eccd9 100644 --- a/src/FSharp.Formatting.CommandTool/BuildCommand.fs +++ b/src/fsdocs-tool/BuildCommand.fs @@ -1,4 +1,4 @@ -namespace FSharp.Formatting.CommandTool +namespace fsdocs open CommandLine @@ -6,6 +6,7 @@ open System open System.Diagnostics open System.IO open System.Globalization +open System.Net open System.Reflection open System.Text @@ -15,7 +16,7 @@ open FSharp.Formatting.HtmlModel.Html open FSharp.Formatting.Literate open FSharp.Formatting.ApiDocs open FSharp.Formatting.Literate.Evaluation -open FSharp.Formatting.CommandTool.Common +open fsdocs.Common open FSharp.Formatting.Templating open Suave @@ -28,7 +29,7 @@ open Suave.Filters /// Convert markdown, script and other content into a static site type internal DocContent ( - outputDirectory, + rootOutputFolderAsGiven, previous: Map<_, _>, lineNumbers, fsiEvaluator, @@ -39,9 +40,9 @@ type internal DocContent crefResolver ) = - let createImageSaver (outputDirectory) = + let createImageSaver (rootOutputFolderAsGiven) = // Download images so that they can be embedded - let wc = new System.Net.WebClient() + let wc = new WebClient() let mutable counter = 0 fun (url: string) -> @@ -51,24 +52,92 @@ type internal DocContent let url2 = sprintf "savedimages/saved%d%s" counter ext - let fn = sprintf "%s/%s" outputDirectory url2 + let fn = sprintf "%s/%s" rootOutputFolderAsGiven url2 - ensureDirectory (sprintf "%s/savedimages" outputDirectory) + ensureDirectory (sprintf "%s/savedimages" rootOutputFolderAsGiven) printfn "downloading %s --> %s" url fn wc.DownloadFile(url, fn) url2 else url - let processFile rootInputFolder isOtherLang (inputFile: string) outputKind template outputPrefix imageSaver = - [ let name = Path.GetFileName(inputFile) + let getOutputFileNames (inputFileFullPath: string) (outputKind: OutputKind) outputFolderRelativeToRoot = + let inputFileName = Path.GetFileName(inputFileFullPath) + let isFsx = inputFileFullPath.EndsWith(".fsx", true, CultureInfo.InvariantCulture) + let isMd = inputFileFullPath.EndsWith(".md", true, CultureInfo.InvariantCulture) + let ext = outputKind.Extension + + let outputFileRelativeToRoot = + if isFsx || isMd then + let basename = Path.GetFileNameWithoutExtension(inputFileFullPath) + + Path.Combine(outputFolderRelativeToRoot, sprintf "%s.%s" basename ext) + else + Path.Combine(outputFolderRelativeToRoot, inputFileName) + let outputFileFullPath = Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFileRelativeToRoot)) + outputFileRelativeToRoot, outputFileFullPath + + let allCultures = + System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures) + |> Array.map (fun x -> x.TwoLetterISOLanguageName) + |> Array.filter (fun x -> x.Length = 2) + |> Array.distinct + + let makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap: Map<(string * OutputKind),string>, outputKind) (markdownReference: string) = + let markdownReferenceAsFullInputPathOpt = try Path.GetFullPath(markdownReference, inputFolderAsGiven) |> Some with _ -> None + match markdownReferenceAsFullInputPathOpt with + | None -> None + | Some markdownReferenceFullInputPath -> + match fullPathFileMap.TryFind (markdownReferenceFullInputPath, outputKind) with + | None -> None + | Some markdownReferenceFullOutputPath -> + try + let outputFolderFullPath = Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot)) + let uri = Uri(outputFolderFullPath+"/").MakeRelativeUri(Uri(markdownReferenceFullOutputPath)).ToString() + Some uri + with _ -> + printfn $"Couldn't map markdown reference {markdownReference} that seemed to correspond to an input file" + None + + /// Prepare the map of input file to output file. This map is used to make substitutions through markdown + /// source such A.md --> A.html or A.fsx --> A.html. The substitutions depend on the output kind. + let prepFile (inputFileFullPath: string) (outputKind: OutputKind) outputFolderRelativeToRoot = + [ let inputFileName = Path.GetFileName(inputFileFullPath) + + if not (inputFileName.StartsWith(".")) && not (inputFileName.StartsWith "_template") then + let inputFileFullPath = Path.GetFullPath(inputFileFullPath) + let _relativeOutputFile, outputFileFullPath = getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot + yield ((inputFileFullPath, outputKind), outputFileFullPath) ] + + /// Likewise prepare the map of input files to output files + let rec prepFolder (inputFolderAsGiven: string) outputFolderRelativeToRoot = + [ let inputs = Directory.GetFiles(inputFolderAsGiven, "*") + + for input in inputs do + yield! prepFile input OutputKind.Html outputFolderRelativeToRoot + yield! prepFile input OutputKind.Latex outputFolderRelativeToRoot + yield! prepFile input OutputKind.Pynb outputFolderRelativeToRoot + yield! prepFile input OutputKind.Fsx outputFolderRelativeToRoot + yield! prepFile input OutputKind.Md outputFolderRelativeToRoot + + for subdir in Directory.EnumerateDirectories(inputFolderAsGiven) do + let subFolderName = Path.GetFileName(subdir) + + if not (subFolderName.StartsWith ".") then + yield! + prepFolder + (Path.Combine(inputFolderAsGiven, subFolderName)) + (Path.Combine(outputFolderRelativeToRoot, subFolderName)) ] + + let processFile rootInputFolder (isOtherLang: bool) (inputFileFullPath: string) outputKind template outputFolderRelativeToRoot imageSaver mdlinkResolver = + [ let name = Path.GetFileName(inputFileFullPath) if name.StartsWith(".") then - printfn "skipping file %s" inputFile + printfn "skipping file %s" inputFileFullPath elif not (name.StartsWith "_template") then - let isFsx = inputFile.EndsWith(".fsx", true, CultureInfo.InvariantCulture) + let isFsx = inputFileFullPath.EndsWith(".fsx", true, CultureInfo.InvariantCulture) - let isMd = inputFile.EndsWith(".md", true, CultureInfo.InvariantCulture) + let isMd = inputFileFullPath.EndsWith(".md", true, CultureInfo.InvariantCulture) // A _template.tex or _template.pynb is needed to generate those files match outputKind, template with @@ -87,23 +156,14 @@ type internal DocContent | OutputKind.Md when saveImages = Some true -> Some imageSaver | _ -> None - let ext = outputKind.Extension - - let relativeOutputFile = - if isFsx || isMd then - let basename = Path.GetFileNameWithoutExtension(inputFile) - - Path.Combine(outputPrefix, sprintf "%s.%s" basename ext) - else - Path.Combine(outputPrefix, name) + let outputFileRelativeToRoot, outputFileFullPath = getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot // Update only when needed - template or file or tool has changed - let outputFile = Path.GetFullPath(Path.Combine(outputDirectory, relativeOutputFile)) let changed = let fileChangeTime = try - File.GetLastWriteTime(inputFile) + File.GetLastWriteTime(inputFileFullPath) with | _ -> DateTime.MaxValue @@ -126,7 +186,7 @@ type internal DocContent let generateTime = try - File.GetLastWriteTime(outputFile) + File.GetLastWriteTime(outputFileFullPath) with | _ -> System.DateTime.MinValue @@ -135,16 +195,16 @@ type internal DocContent // If it's changed or we don't know anything about it // we have to compute the model to get the global substitutions right let mainRun = (outputKind = OutputKind.Html) - let haveModel = previous.TryFind inputFile + let haveModel = previous.TryFind inputFileFullPath if changed || (watch && mainRun && haveModel.IsNone) then if isFsx then - printfn " generating model for %s --> %s" inputFile relativeOutputFile + printfn " generating model for %s --> %s" inputFileFullPath outputFileRelativeToRoot let model = Literate.ParseAndTransformScriptFile( - inputFile, - output = relativeOutputFile, + inputFileFullPath, + output = outputFileRelativeToRoot, outputKind = outputKind, ?formatAgent = None, ?prefix = None, @@ -156,31 +216,32 @@ type internal DocContent generateAnchors = true, ?imageSaver = imageSaverOpt, ?rootInputFolder = rootInputFolder, - crefResolver = crefResolver + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver ) yield ((if mainRun then - Some(inputFile, isOtherLang, model) + Some(inputFileFullPath, isOtherLang, model) else None), (fun p -> - printfn " writing %s --> %s" inputFile relativeOutputFile - ensureDirectory (Path.GetDirectoryName(outputFile)) + printfn " writing %s --> %s" inputFileFullPath outputFileRelativeToRoot + ensureDirectory (Path.GetDirectoryName(outputFileFullPath)) SimpleTemplating.UseFileAsSimpleTemplate( p @ model.Substitutions, template, - outputFile + outputFileFullPath ))) elif isMd then - printfn " preparing %s --> %s" inputFile relativeOutputFile + printfn " preparing %s --> %s" inputFileFullPath outputFileRelativeToRoot let model = Literate.ParseAndTransformMarkdownFile( - inputFile, - output = relativeOutputFile, + inputFileFullPath, + output = outputFileRelativeToRoot, outputKind = outputKind, ?formatAgent = None, ?prefix = None, @@ -191,63 +252,58 @@ type internal DocContent generateAnchors = true, ?imageSaver = imageSaverOpt, ?rootInputFolder = rootInputFolder, - crefResolver = crefResolver + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver ) yield ((if mainRun then - Some(inputFile, isOtherLang, model) + Some(inputFileFullPath, isOtherLang, model) else None), (fun p -> - printfn " writing %s --> %s" inputFile relativeOutputFile - ensureDirectory (Path.GetDirectoryName(outputFile)) + printfn " writing %s --> %s" inputFileFullPath outputFileRelativeToRoot + ensureDirectory (Path.GetDirectoryName(outputFileFullPath)) SimpleTemplating.UseFileAsSimpleTemplate( p @ model.Substitutions, template, - outputFile + outputFileFullPath ))) else if mainRun then yield (None, (fun _p -> - printfn " copying %s --> %s" inputFile relativeOutputFile - ensureDirectory (Path.GetDirectoryName(outputFile)) + printfn " copying %s --> %s" inputFileFullPath outputFileRelativeToRoot + ensureDirectory (Path.GetDirectoryName(outputFileFullPath)) // check the file still exists for the incremental case - if (File.Exists inputFile) then + if (File.Exists inputFileFullPath) then // ignore errors in watch mode try - File.Copy(inputFile, outputFile, true) - File.SetLastWriteTime(outputFile, DateTime.Now) + File.Copy(inputFileFullPath, outputFileFullPath, true) + File.SetLastWriteTime(outputFileFullPath, DateTime.Now) with | _ when watch -> ())) else if mainRun && watch then - //printfn "skipping unchanged file %s" inputFile - yield (Some(inputFile, isOtherLang, haveModel.Value), (fun _ -> ())) ] + //printfn "skipping unchanged file %s" inputFileFullPath + yield (Some(inputFileFullPath, isOtherLang, haveModel.Value), (fun _ -> ())) ] - let allCultures = - System.Globalization.CultureInfo.GetCultures(System.Globalization.CultureTypes.AllCultures) - |> Array.map (fun x -> x.TwoLetterISOLanguageName) - |> Array.filter (fun x -> x.Length = 2) - |> Array.distinct - - let rec processDirectory - (htmlTemplate, texTemplate, pynbTemplate, fsxTemplate, mdTemplate, isOtherLang, rootInputFolder) - (inputFolder: string) - outputPrefix + let rec processFolder + (htmlTemplate, texTemplate, pynbTemplate, fsxTemplate, mdTemplate, isOtherLang, rootInputFolder, fullPathFileMap) + (inputFolderAsGiven: string) + outputFolderRelativeToRoot = [ // Look for the presence of the _template.* files to activate the // generation of the content. - let indirName = Path.GetFileName(inputFolder).ToLower() + let indirName = Path.GetFileName(inputFolderAsGiven).ToLower() // Two-letter directory names (e.g. 'ja') with 'docs' count as multi-language and are suppressed from table-of-content // generation and site search index let isOtherLang = isOtherLang || (indirName.Length = 2 && allCultures |> Array.contains indirName) - let possibleNewHtmlTemplate = Path.Combine(inputFolder, "_template.html") + let possibleNewHtmlTemplate = Path.Combine(inputFolderAsGiven, "_template.html") let htmlTemplate = if File.Exists(possibleNewHtmlTemplate) then @@ -255,7 +311,7 @@ type internal DocContent else htmlTemplate - let possibleNewPynbTemplate = Path.Combine(inputFolder, "_template.ipynb") + let possibleNewPynbTemplate = Path.Combine(inputFolderAsGiven, "_template.ipynb") let pynbTemplate = if File.Exists(possibleNewPynbTemplate) then @@ -263,7 +319,7 @@ type internal DocContent else pynbTemplate - let possibleNewFsxTemplate = Path.Combine(inputFolder, "_template.fsx") + let possibleNewFsxTemplate = Path.Combine(inputFolderAsGiven, "_template.fsx") let fsxTemplate = if File.Exists(possibleNewFsxTemplate) then @@ -271,7 +327,7 @@ type internal DocContent else fsxTemplate - let possibleNewMdTemplate = Path.Combine(inputFolder, "_template.md") + let possibleNewMdTemplate = Path.Combine(inputFolderAsGiven, "_template.md") let mdTemplate = if File.Exists(possibleNewMdTemplate) then @@ -279,7 +335,7 @@ type internal DocContent else mdTemplate - let possibleNewLatexTemplate = Path.Combine(inputFolder, "_template.tex") + let possibleNewLatexTemplate = Path.Combine(inputFolderAsGiven, "_template.tex") let texTemplate = if File.Exists(possibleNewLatexTemplate) then @@ -287,48 +343,55 @@ type internal DocContent else texTemplate - ensureDirectory (Path.Combine(outputDirectory, outputPrefix)) + ensureDirectory (Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot)) - let inputs = Directory.GetFiles(inputFolder, "*") + let inputs = Directory.GetFiles(inputFolderAsGiven, "*") - let imageSaver = createImageSaver (Path.Combine(outputDirectory, outputPrefix)) + let imageSaver = createImageSaver (Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot)) // Look for the four different kinds of content for input in inputs do - yield! processFile rootInputFolder isOtherLang input OutputKind.Html htmlTemplate outputPrefix imageSaver - yield! processFile rootInputFolder isOtherLang input OutputKind.Latex texTemplate outputPrefix imageSaver - yield! processFile rootInputFolder isOtherLang input OutputKind.Pynb pynbTemplate outputPrefix imageSaver - yield! processFile rootInputFolder isOtherLang input OutputKind.Fsx fsxTemplate outputPrefix imageSaver - yield! processFile rootInputFolder isOtherLang input OutputKind.Md mdTemplate outputPrefix imageSaver + yield! processFile rootInputFolder isOtherLang input OutputKind.Html htmlTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Html)) + yield! processFile rootInputFolder isOtherLang input OutputKind.Latex texTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Latex)) + yield! processFile rootInputFolder isOtherLang input OutputKind.Pynb pynbTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Pynb)) + yield! processFile rootInputFolder isOtherLang input OutputKind.Fsx fsxTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Fsx)) + yield! processFile rootInputFolder isOtherLang input OutputKind.Md mdTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Md)) - for subdir in Directory.EnumerateDirectories(inputFolder) do - let name = Path.GetFileName(subdir) + for subInputFolderFullPath in Directory.EnumerateDirectories(inputFolderAsGiven) do + let subInputFolderName = Path.GetFileName(subInputFolderFullPath) - if name.StartsWith "." then - printfn " skipping directory %s" subdir + if subInputFolderName.StartsWith "." then + printfn " skipping directory %s" subInputFolderFullPath else yield! - processDirectory + processFolder (htmlTemplate, texTemplate, pynbTemplate, fsxTemplate, mdTemplate, isOtherLang, - rootInputFolder) - (Path.Combine(inputFolder, name)) - (Path.Combine(outputPrefix, name)) ] + rootInputFolder, + fullPathFileMap) + (Path.Combine(inputFolderAsGiven, subInputFolderName)) + (Path.Combine(outputFolderRelativeToRoot, subInputFolderName)) ] + + member _.Convert(rootInputFolderAsGiven, htmlTemplate, extraInputs) = - member _.Convert(input, htmlTemplate, extraInputs) = + let inputDirectories = extraInputs @ [ (rootInputFolderAsGiven, ".") ] - let inputDirectories = extraInputs @ [ (input, ".") ] + // Maps full input paths to full output paths + let fullPathFileMap = + [ for (rootInputFolderAsGiven, outputFolderRelativeToRoot) in inputDirectories do + yield! prepFolder rootInputFolderAsGiven outputFolderRelativeToRoot ] + |> Map.ofList - [ for (inputFolder, outputPrefix) in inputDirectories do + [ for (rootInputFolderAsGiven, outputFolderRelativeToRoot) in inputDirectories do yield! - processDirectory - (htmlTemplate, None, None, None, None, false, Some inputFolder) - inputFolder - outputPrefix ] + processFolder + (htmlTemplate, None, None, None, None, false, Some rootInputFolderAsGiven, fullPathFileMap) + rootInputFolderAsGiven + outputFolderRelativeToRoot ] member _.GetSearchIndexEntries(docModels: (string * bool * LiterateDocModel) list) = [| for (_inputFile, isOtherLang, model) in docModels do @@ -344,10 +407,10 @@ type internal DocContent let modelsForList = [ for thing in docModels do match thing with - | (inputFile, isOtherLang, model) when + | (inputFileFullPath, isOtherLang, model) when not isOtherLang && model.OutputKind = OutputKind.Html - && not (Path.GetFileNameWithoutExtension(inputFile) = "index") + && not (Path.GetFileNameWithoutExtension(inputFileFullPath) = "index") -> model | _ -> () ] @@ -450,7 +513,7 @@ module Serve = do! webSocket.send Close emptyResponse true } - let startWebServer outputDirectory localPort = + let startWebServer rootOutputFolderAsGiven localPort = let defaultBinding = defaultConfig.bindings.[0] let withPort = { defaultBinding.socketBinding with port = uint16 localPort } @@ -458,7 +521,7 @@ module Serve = let serverConfig = { defaultConfig with bindings = [ { defaultBinding with socketBinding = withPort } ] - homeFolder = Some outputDirectory } + homeFolder = Some rootOutputFolderAsGiven } let app = choose [ path "/" >=> Redirection.redirect "/index.html" @@ -482,7 +545,7 @@ type CoreBuildOptions(watch) = [] + HelpText = "Output Folder (default 'output' for 'build' and 'tmp/watch' for 'watch'.")>] member val output = "" with get, set [] @@ -756,15 +819,15 @@ type CoreBuildOptions(watch) = // TODO: This 'distinctBy' is merging references that may be inconsistent across the project set |> List.distinctBy (fun ref -> Path.GetFileName(ref.[3..])) - let output = + let rootOutputFolderAsGiven = if this.output = "" then if watch then "tmp/watch" else "output" else this.output // This is in-package - // From .nuget\packages\fsharp.formatting.commandtool\7.1.7\tools\net5.0\any - // to .nuget\packages\fsharp.formatting.commandtool\7.1.7\templates + // From .nuget\packages\fsdocs-tool\7.1.7\tools\net5.0\any + // to .nuget\packages\fsdocs-tool\7.1.7\templates let dir = Path.GetDirectoryName(typeof.Assembly.Location) let defaultTemplateAttempt1 = @@ -792,8 +855,8 @@ type CoreBuildOptions(watch) = let extraInputs = [ if not this.nodefaultcontent then // The "extras" content goes in "." - // From .nuget\packages\fsharp.formatting.commandtool\7.1.7\tools\net5.0\any - // to .nuget\packages\fsharp.formatting.commandtool\7.1.7\extras + // From .nuget\packages\fsdocs-tool\7.1.7\tools\net5.0\any + // to .nuget\packages\fsdocs-tool\7.1.7\extras let attempt1 = Path.GetFullPath(Path.Combine(dir, "..", "..", "..", "extras")) if (try @@ -804,8 +867,8 @@ type CoreBuildOptions(watch) = (attempt1, ".") else // This is for in-repo use only, assuming we are executing directly from - // src\FSharp.Formatting.CommandTool\bin\Debug\net5.0\fsdocs.exe - // src\FSharp.Formatting.CommandTool\bin\Release\net5.0\fsdocs.exe + // src\fsdocs-tool\bin\Debug\net5.0\fsdocs.exe + // src\fsdocs-tool\bin\Release\net5.0\fsdocs.exe let attempt2 = Path.GetFullPath(Path.Combine(dir, "..", "..", "..", "..", "..", "docs", "content")) @@ -838,7 +901,7 @@ type CoreBuildOptions(watch) = let indxTxt = System.Text.Json.JsonSerializer.Serialize index - File.WriteAllText(Path.Combine(output, "index.json"), indxTxt) + File.WriteAllText(Path.Combine(rootOutputFolderAsGiven, "index.json"), indxTxt) /// get the hot reload script if running in watch mode let getLatestWatchScript () = @@ -893,7 +956,7 @@ type CoreBuildOptions(watch) = | OutputKind.Html -> ApiDocs.GenerateHtmlPhased( inputs = apiDocInputs, - output = output, + output = rootOutputFolderAsGiven, collectionName = collectionName, substitutions = docsParameters, qualify = this.qualify, @@ -906,7 +969,7 @@ type CoreBuildOptions(watch) = | OutputKind.Md -> ApiDocs.GenerateMarkdownPhased( inputs = apiDocInputs, - output = output, + output = rootOutputFolderAsGiven, collectionName = collectionName, substitutions = docsParameters, qualify = this.qualify, @@ -968,7 +1031,7 @@ type CoreBuildOptions(watch) = let docContent = DocContent( - output, + rootOutputFolderAsGiven, latestDocContentResults, Some this.linenumbers, fsiEvaluator, @@ -1017,8 +1080,9 @@ type CoreBuildOptions(watch) = //----------------------------------------- // Clean - let fullOut = Path.GetFullPath output - let fullIn = Path.GetFullPath this.input + let rootInputFolderAsGiven = this.input + let rootInputFolderFullPath = Path.GetFullPath rootInputFolderAsGiven + let rootOutputFolderFullPath = Path.GetFullPath rootOutputFolderAsGiven if this.clean then let rec clean dir = @@ -1029,16 +1093,17 @@ type CoreBuildOptions(watch) = if not (Path.GetFileName(subdir).StartsWith ".") then clean subdir - if - output <> "/" && output <> "." && fullOut <> fullIn - && not (String.IsNullOrEmpty output) - then + let isOutputPathOK = + rootOutputFolderAsGiven <> "/" && rootOutputFolderAsGiven <> "." && rootOutputFolderFullPath <> rootInputFolderFullPath + && not (String.IsNullOrEmpty rootOutputFolderAsGiven) + + if isOutputPathOK then try - clean fullOut + clean rootOutputFolderFullPath with | e -> printfn "warning: error during cleaning, continuing: %s" e.Message else - printfn "warning: skipping cleaning due to strange output path: \"%s\"" output + printfn "warning: skipping cleaning due to strange output path: \"%s\"" rootOutputFolderAsGiven if watch then printfn "Building docs first time..." @@ -1194,8 +1259,8 @@ type CoreBuildOptions(watch) = docsQueued <- false if not this.noserver_option then - printfn "starting server on http://localhost:%d for content in %s" this.port_option fullOut - Serve.startWebServer fullOut this.port_option + printfn "starting server on http://localhost:%d for content in %s" this.port_option rootOutputFolderFullPath + Serve.startWebServer rootOutputFolderFullPath this.port_option if not this.nolaunch_option then let url = sprintf "http://localhost:%d/%s" this.port_option this.open_option diff --git a/src/FSharp.Formatting.CommandTool/Options.fs b/src/fsdocs-tool/Options.fs similarity index 96% rename from src/FSharp.Formatting.CommandTool/Options.fs rename to src/fsdocs-tool/Options.fs index 648fee3e1..05d4b091d 100644 --- a/src/FSharp.Formatting.CommandTool/Options.fs +++ b/src/fsdocs-tool/Options.fs @@ -1,4 +1,4 @@ -namespace FSharp.Formatting.CommandTool +namespace fsdocs module Common = diff --git a/src/FSharp.Formatting.CommandTool/Program.fs b/src/fsdocs-tool/Program.fs similarity index 73% rename from src/FSharp.Formatting.CommandTool/Program.fs rename to src/fsdocs-tool/Program.fs index 847412b50..4656e2978 100644 --- a/src/FSharp.Formatting.CommandTool/Program.fs +++ b/src/fsdocs-tool/Program.fs @@ -1,7 +1,10 @@ -module FSharp.Formatting.CommandTool.Main +module fsdocs.Main open CommandLine +[] +do () + [] let main argv = CommandLine diff --git a/src/FSharp.Formatting.CommandTool/ProjectCracker.fs b/src/fsdocs-tool/ProjectCracker.fs similarity index 99% rename from src/FSharp.Formatting.CommandTool/ProjectCracker.fs rename to src/fsdocs-tool/ProjectCracker.fs index b5d87fa17..e1510e0a9 100644 --- a/src/FSharp.Formatting.CommandTool/ProjectCracker.fs +++ b/src/fsdocs-tool/ProjectCracker.fs @@ -1,4 +1,4 @@ -namespace FSharp.Formatting.CommandTool +namespace fsdocs open System open System.IO diff --git a/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj b/src/fsdocs-tool/fsdocs-tool.fsproj similarity index 97% rename from src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj rename to src/fsdocs-tool/fsdocs-tool.fsproj index a930cc7ab..1e6b284be 100644 --- a/src/FSharp.Formatting.CommandTool/FSharp.Formatting.CommandTool.fsproj +++ b/src/fsdocs-tool/fsdocs-tool.fsproj @@ -4,7 +4,7 @@ Exe fsdocs net5.0 - FSharp.Formatting.CommandTool + fsdocs-tool LatestMajor true true diff --git a/src/FSharp.Formatting.CommandTool/paket.references b/src/fsdocs-tool/paket.references similarity index 100% rename from src/FSharp.Formatting.CommandTool/paket.references rename to src/fsdocs-tool/paket.references diff --git a/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs b/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs index a74a96f61..94d43bac1 100644 --- a/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs +++ b/tests/FSharp.ApiDocs.Tests/ApiDocsTests.fs @@ -915,7 +915,7 @@ let ``ApiDocs highlights code snippets in Markdown comments`` (format: OutputFor |> shouldContainText """var""" files.[(sprintf "fslib-myclass.%s" format.Extension)] - |> shouldContainText """val a : FsLib.MyClass""" + |> shouldContainText """val a: FsLib.MyClass""" [] [] diff --git a/tests/FSharp.CodeFormat.Tests/CodeFormatTests.fs b/tests/FSharp.CodeFormat.Tests/CodeFormatTests.fs index 086491e4d..413268260 100644 --- a/tests/FSharp.CodeFormat.Tests/CodeFormatTests.fs +++ b/tests/FSharp.CodeFormat.Tests/CodeFormatTests.fs @@ -50,13 +50,13 @@ let ``Simple code snippet is formatted with tool tips`` () = snips |> containsSpan (function - | TokenSpan.Token (_, "hello", Some (ToolTipWithLiteral "val hello : int")) -> true + | TokenSpan.Token (_, "hello", Some (ToolTipWithLiteral "val hello: int")) -> true | _ -> false) |> shouldEqual true // Note: 'nameof' will not be in preview forever, so this test may need to be updated in the future [] -let ``Preview language feature from FSharp Core is supported`` () = +let ``nameof language feature from FSharp Core is supported`` () = let source = """ let x = 12 @@ -69,7 +69,7 @@ nameof x snips |> containsSpan (function - | TokenSpan.Token (_, "nameof", Some (ToolTipWithLiteral "val nameof : 'T -> string")) -> true + | TokenSpan.Token (_, "nameof", Some (ToolTipWithLiteral "val nameof: 'T -> string")) -> true | _ -> false) |> shouldEqual true @@ -140,7 +140,7 @@ let ``Simple code snippet is formatted as HTML`` () = content |> shouldContainText (sprintf "10" CSS.Number) - tooltip |> shouldContainText "val hello : int" + tooltip |> shouldContainText "val hello: int" [] let ``Non-unicode characters do not cause exception`` () = @@ -306,7 +306,7 @@ let ``Simple code snippet is formatted as HTML - custom CSS`` () = content |> shouldContainText (sprintf "10" "Number") - tooltip |> shouldContainText "val hello : int" + tooltip |> shouldContainText "val hello: int" [] diff --git a/tests/FSharp.Literate.Tests/EvalTests.fs b/tests/FSharp.Literate.Tests/EvalTests.fs index 41197cbce..3c9f95008 100644 --- a/tests/FSharp.Literate.Tests/EvalTests.fs +++ b/tests/FSharp.Literate.Tests/EvalTests.fs @@ -388,7 +388,7 @@ let xxxxxxx = 1 Literate.ParseScriptString(content, "." "A.fsx", formatAgent = getFormatAgent (), fsiEvaluator = fsie) let html1 = Literate.ToHtml(doc1) - html1 |> shouldContainText "val xxxxxxx : int = 1" + html1 |> shouldContainText "val xxxxxxx: int = 1" [] let ``Can include-html-output`` () = @@ -470,9 +470,9 @@ printfn "GOODBYE" html1 |> shouldContainText "GOODBYE" html1 - |> shouldContainText "val xxxxxxx : int list = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10]" + |> shouldContainText "val xxxxxxx: int list = [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10]" - html1 |> shouldContainText "val it : unit = ()" + html1 |> shouldContainText "val it: unit = ()" [] let ``Can hide and include-it`` () = @@ -528,7 +528,7 @@ let xxxx = 1+1 let html1 = Literate.ToHtml(doc1) html1 |> shouldContainText "helloworld" - html1 |> shouldContainText "val xxxx : int" + html1 |> shouldContainText "val xxxx: int" html1 |> shouldContainText """let""" // formatted code @@ -552,7 +552,7 @@ let xxxx = 1+1 let html1 = Literate.ToHtml(doc1) html1 |> shouldContainText "helloworld" - html1 |> shouldContainText "val xxxx : int" + html1 |> shouldContainText "val xxxx: int" html1 |> shouldNotContainText """let""" // formatted code @@ -575,7 +575,7 @@ let xxxx = 1+1 let html1 = Literate.ToHtml(doc1) html1 |> shouldContainText "helloworld" - html1 |> shouldContainText "val xxxx : int" + html1 |> shouldContainText "val xxxx: int" html1 |> shouldContainText "2000" [] diff --git a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj index 1993dbdd0..371ae3ea9 100644 --- a/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj +++ b/tests/FSharp.Literate.Tests/FSharp.Literate.Tests.fsproj @@ -7,8 +7,8 @@ - - + + @@ -17,8 +17,10 @@ + + diff --git a/tests/FSharp.Literate.Tests/LiterateTests.fs b/tests/FSharp.Literate.Tests/LiterateTests.fs index f03630308..c5e3de299 100644 --- a/tests/FSharp.Literate.Tests/LiterateTests.fs +++ b/tests/FSharp.Literate.Tests/LiterateTests.fs @@ -749,13 +749,13 @@ let ``Parsing simple script and markdown produces the same result`` () = let ``Code and HTML is formatted with a tooltip in Markdown file using substitution in HTML template`` () = let templateHtml = __SOURCE_DIRECTORY__ "files/template.html" - let simpleMd = __SOURCE_DIRECTORY__ "files/simple.md" + let simpleMd = __SOURCE_DIRECTORY__ "files/simple2.md" use temp = new TempFile() Literate.ConvertMarkdownFile(simpleMd, templateHtml, temp.File) temp.Content |> shouldContainText "" - temp.Content |> shouldContainText "val hello : string" + temp.Content |> shouldContainText "val hello: string" temp.Content |> shouldContainText "Heading" @@ -763,13 +763,13 @@ let ``Code and HTML is formatted with a tooltip in Markdown file using substitut let ``Code and HTML is formatted with a tooltip in F# Script file using substitution in HTML template`` () = let templateHtml = __SOURCE_DIRECTORY__ </> "files/template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, templateHtml, temp.File) temp.Content |> shouldContainText "</a>" - temp.Content |> shouldContainText "val hello : string" + temp.Content |> shouldContainText "val hello: string" temp.Content |> shouldContainText "<title>Heading" @@ -777,7 +777,7 @@ let ``Code and HTML is formatted with a tooltip in F# Script file using substitu let ``Substitutions apply to correct parts of inputs`` () = let templateHtml = __SOURCE_DIRECTORY__ </> "files/template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, templateHtml, temp.File) @@ -785,58 +785,58 @@ let ``Substitutions apply to correct parts of inputs`` () = temp.Content |> shouldContainText "dont-substitute-in-inline-code: <code>{{fsdocs-source-basename}}</code>" - temp.Content |> shouldContainText "substitute-in-template filename: simple.fsx" + temp.Content |> shouldContainText "substitute-in-template filename: simple1.fsx" - temp.Content |> shouldContainText "substitute-in-template basename: simple" + temp.Content |> shouldContainText "substitute-in-template basename: simple1" - temp.Content |> shouldContainText "substitute-in-markdown: simple" // check substitutions are made in markdown + temp.Content |> shouldContainText "substitute-in-markdown: simple1" // check substitutions are made in markdown - temp.Content |> shouldContainText "http://substitute-in-link: simple" // check substitutions are made in links + temp.Content |> shouldContainText "http://substitute-in-link: simple1" // check substitutions are made in links - temp.Content |> shouldContainText "substitute-in-href-text: simple" // check substitutions are made in href text + temp.Content |> shouldContainText "substitute-in-href-text: simple1" // check substitutions are made in href text - temp.Content |> shouldContainText "substitute-in-fsx-code: simple" // check substitutions are made in FSX code + temp.Content |> shouldContainText "substitute-in-fsx-code: simple1" // check substitutions are made in FSX code [<Test>] let ``Filename substitutions are correct`` () = let templateHtml = __SOURCE_DIRECTORY__ </> "files/template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, templateHtml, temp.File) - temp.Content |> shouldContainText "substitute-in-template filename: simple.fsx" + temp.Content |> shouldContainText "substitute-in-template filename: simple1.fsx" - temp.Content |> shouldContainText "substitute-in-template basename: simple" + temp.Content |> shouldContainText "substitute-in-template basename: simple1" [<Test>] let ``Filename substitutions are correct with relative path`` () = let templateHtml = __SOURCE_DIRECTORY__ </> "files/template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, templateHtml, temp.File, rootInputFolder = (__SOURCE_DIRECTORY__ </> "files")) - temp.Content |> shouldContainText "substitute-in-template filename: simple.fsx" + temp.Content |> shouldContainText "substitute-in-template filename: simple1.fsx" - temp.Content |> shouldContainText "substitute-in-template basename: simple" + temp.Content |> shouldContainText "substitute-in-template basename: simple1" [<Test>] let ``Filename substitutions are correct with relative path 2`` () = let templateHtml = __SOURCE_DIRECTORY__ </> "files/template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, templateHtml, temp.File, rootInputFolder = __SOURCE_DIRECTORY__) temp.Content - |> shouldContainText "substitute-in-template filename: files/simple.fsx" + |> shouldContainText "substitute-in-template filename: files/simple1.fsx" temp.Content - |> shouldContainText "substitute-in-template basename: files/simple" + |> shouldContainText "substitute-in-template basename: files/simple1" // -------------------------------------------------------------------------------------- // Test processing simple files using the NuGet included templates @@ -853,12 +853,12 @@ let info = let ``Can process fsx file using HTML template`` () = let docPageTemplate = __SOURCE_DIRECTORY__ </> "../../docs/_template.html" - let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple.fsx" + let simpleFsx = __SOURCE_DIRECTORY__ </> "files/simple1.fsx" use temp = new TempFile() Literate.ConvertScriptFile(simpleFsx, docPageTemplate, temp.File, substitutions = info) - temp.Content |> shouldContainText "val hello : string" + temp.Content |> shouldContainText "val hello: string" temp.Content |> shouldContainText "<title>Heading" @@ -866,12 +866,12 @@ let ``Can process fsx file using HTML template`` () = let ``Can process md file using HTML template`` () = let docPageTemplate = __SOURCE_DIRECTORY__ </> "../../docs/_template.html" - let simpleMd = __SOURCE_DIRECTORY__ </> "files/simple.md" + let simpleMd = __SOURCE_DIRECTORY__ </> "files/simple2.md" use temp = new TempFile() Literate.ConvertMarkdownFile(simpleMd, docPageTemplate, temp.File, substitutions = info) - temp.Content |> shouldContainText "val hello : string" + temp.Content |> shouldContainText "val hello: string" temp.Content |> shouldContainText "<title>Heading" @@ -945,10 +945,40 @@ let test = 42 let html = Literate.ToHtml(doc2.With(formattedTips = "")) let tips = doc2.FormattedTips - tips |> shouldContainText "test : int" - html |> shouldNotContainText "test : int" + tips |> shouldContainText "test: int" + html |> shouldNotContainText "test: int" html |> shouldContainText "hello" +[<Test>] +let ``Formatted script transforms markdown links`` () = + let content = + """(** +[hello](A.fsx) +*) +let test = 42 +""" + + let doc = Literate.ParseScriptString(content, "." </> "A.fsx", getFormatAgent ()) + + let doc2 = Literate.FormatLiterateNodes(doc, outputKind = OutputKind.Html) + + let html = Literate.ToHtml(doc2.With(formattedTips = ""), mdlinkResolver=(fun s -> if s = "A.fsx" then Some "A.html" else None)) + + html |> shouldContainText "A.html" + +[<Test>] +let ``Formatted markdown transforms markdown links`` () = + let content = + """ +[hello](A.md) +""" + + let doc = Literate.ParseMarkdownString(content, "." </> "A.md", getFormatAgent ()) + + let html = Literate.ToHtml(doc.With(formattedTips = ""), mdlinkResolver=(fun s -> if s = "A.md" then Some "A.html" else None)) + + html |> shouldContainText "A.html" + [<Test>] let ``Can format single snippet with label using literate parser`` () = diff --git a/tests/FSharp.Literate.Tests/files/simple.fsx b/tests/FSharp.Literate.Tests/files/simple.fsx deleted file mode 100644 index becefcec2..000000000 --- a/tests/FSharp.Literate.Tests/files/simple.fsx +++ /dev/null @@ -1,17 +0,0 @@ -(** -Heading -======= - -With some [hyperlink](http://tomasp.net) - -dont-substitute-in-inline-code: `{{fsdocs-source-basename}}` - -substitute-in-markdown: {{fsdocs-source-basename}} - -[ABC](http://substitute-in-link: {{fsdocs-source-basename}}) -[substitute-in-href-text: {{fsdocs-source-basename}}](http://google.com) -*) -let hello = "Code sample" - -let goodbye = - "substitute-in-fsx-code: {{fsdocs-source-basename}}" diff --git a/tests/FSharp.Literate.Tests/files/simple.md b/tests/FSharp.Literate.Tests/files/simple.md deleted file mode 100644 index 01ababddd..000000000 --- a/tests/FSharp.Literate.Tests/files/simple.md +++ /dev/null @@ -1,6 +0,0 @@ -Heading -======= - -With some [hyperlink](http://tomasp.net) - - let hello = "Code sample" From 78faf4535306022a321133dcff846f17dfcd6ade Mon Sep 17 00:00:00 2001 From: Don Syme <donsyme@fastmail.fm> Date: Sat, 6 Nov 2021 19:50:07 +0000 Subject: [PATCH 2/9] format --- .gitignore | 2 + src/FSharp.Formatting.Literate/Formatting.fs | 35 +++- src/FSharp.Formatting.Literate/Literate.fs | 98 +++++++++-- src/FSharp.Formatting.Markdown/Markdown.fs | 77 ++++++++- src/fsdocs-tool/BuildCommand.fs | 152 +++++++++++++++--- .../FSharp.Literate.Tests/DocContentTests.fs | 63 ++++++++ tests/FSharp.Literate.Tests/LiterateTests.fs | 22 ++- .../FSharp.Literate.Tests/files/_template.fsx | 0 .../files/_template.html | 83 ++++++++++ .../files/_template.ipynb | 1 + .../FSharp.Literate.Tests/files/_template.md | 0 .../FSharp.Literate.Tests/files/_template.tex | 48 ++++++ tests/FSharp.Literate.Tests/files/simple1.fsx | 20 +++ tests/FSharp.Literate.Tests/files/simple2.md | 8 + 14 files changed, 563 insertions(+), 46 deletions(-) create mode 100644 tests/FSharp.Literate.Tests/DocContentTests.fs create mode 100644 tests/FSharp.Literate.Tests/files/_template.fsx create mode 100644 tests/FSharp.Literate.Tests/files/_template.html create mode 100644 tests/FSharp.Literate.Tests/files/_template.ipynb create mode 100644 tests/FSharp.Literate.Tests/files/_template.md create mode 100644 tests/FSharp.Literate.Tests/files/_template.tex create mode 100644 tests/FSharp.Literate.Tests/files/simple1.fsx create mode 100644 tests/FSharp.Literate.Tests/files/simple2.md diff --git a/.gitignore b/.gitignore index 649fce3b6..4626b20db 100644 --- a/.gitignore +++ b/.gitignore @@ -43,3 +43,5 @@ tmp *.binlog version.props src/Common/AssemblyInfo.?s +tests/FSharp.Literate.Tests/output1/ +.vscode/ diff --git a/src/FSharp.Formatting.Literate/Formatting.fs b/src/FSharp.Formatting.Literate/Formatting.fs index a0396dd81..c37f2796e 100644 --- a/src/FSharp.Formatting.Literate/Formatting.fs +++ b/src/FSharp.Formatting.Literate/Formatting.fs @@ -11,10 +11,34 @@ module internal Formatting = /// Format document with the specified output kind let format (doc: MarkdownDocument) generateAnchors outputKind substitutions crefResolver mdlinkResolver = match outputKind with - | OutputKind.Fsx -> Markdown.ToFsx(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) - | OutputKind.Md -> Markdown.ToMd(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) - | OutputKind.Pynb -> Markdown.ToPynb(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) - | OutputKind.Latex -> Markdown.ToLatex(doc, substitutions = substitutions, crefResolver = crefResolver, mdlinkResolver=mdlinkResolver) + | OutputKind.Fsx -> + Markdown.ToFsx( + doc, + substitutions = substitutions, + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver + ) + | OutputKind.Md -> + Markdown.ToMd( + doc, + substitutions = substitutions, + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver + ) + | OutputKind.Pynb -> + Markdown.ToPynb( + doc, + substitutions = substitutions, + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver + ) + | OutputKind.Latex -> + Markdown.ToLatex( + doc, + substitutions = substitutions, + crefResolver = crefResolver, + mdlinkResolver = mdlinkResolver + ) | OutputKind.Html -> let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) @@ -124,7 +148,8 @@ module internal Formatting = let doc = getSourceDocument doc |> Transformations.replaceLiterateParagraphs ctx - let source = format doc.MarkdownDocument ctx.GenerateHeaderAnchors ctx.OutputKind [] (fun _ -> None) (fun _ -> None) + let source = + format doc.MarkdownDocument ctx.GenerateHeaderAnchors ctx.OutputKind [] (fun _ -> None) (fun _ -> None) [ ParamKeys.``fsdocs-source-filename``, relativeSourceFileName ParamKeys.``fsdocs-source-basename``, relativeSourceFileBaseName diff --git a/src/FSharp.Formatting.Literate/Literate.fs b/src/FSharp.Formatting.Literate/Literate.fs index add51e83f..e2d26f634 100644 --- a/src/FSharp.Formatting.Literate/Literate.fs +++ b/src/FSharp.Formatting.Literate/Literate.fs @@ -250,7 +250,16 @@ type Literate private () = let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = makeFormattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver + let ctx = + makeFormattingContext + OutputKind.Html + prefix + lineNumbers + generateAnchors + None + tokenKindToCss + crefResolver + mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc @@ -290,7 +299,16 @@ type Literate private () = let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = makeFormattingContext OutputKind.Html prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver + let ctx = + makeFormattingContext + OutputKind.Html + prefix + lineNumbers + generateAnchors + None + tokenKindToCss + crefResolver + mdlinkResolver let doc = Transformations.replaceLiterateParagraphs ctx doc @@ -322,7 +340,18 @@ type Literate private () = ) = let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = makeFormattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver mdlinkResolver + + let ctx = + makeFormattingContext + OutputKind.Latex + prefix + lineNumbers + generateAnchors + None + None + crefResolver + mdlinkResolver + let doc = Transformations.replaceLiterateParagraphs ctx doc Markdown.ToLatex(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), ?substitutions = substitutions) @@ -340,7 +369,18 @@ type Literate private () = ) = let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - let ctx = makeFormattingContext OutputKind.Latex prefix lineNumbers generateAnchors None None crefResolver mdlinkResolver + + let ctx = + makeFormattingContext + OutputKind.Latex + prefix + lineNumbers + generateAnchors + None + None + crefResolver + mdlinkResolver + let doc = Transformations.replaceLiterateParagraphs ctx doc Markdown.WriteLatex(MarkdownDocument(doc.Paragraphs, doc.DefinedLinks), writer, ?substitutions = substitutions) @@ -376,7 +416,16 @@ type Literate private () = let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html - let ctx = makeFormattingContext outputKind prefix lineNumbers generateAnchors None tokenKindToCss crefResolver mdlinkResolver + let ctx = + makeFormattingContext + outputKind + prefix + lineNumbers + generateAnchors + None + tokenKindToCss + crefResolver + mdlinkResolver Transformations.replaceLiterateParagraphs ctx doc @@ -411,10 +460,8 @@ type Literate private () = let parseOptions = match outputKind with | OutputKind.Fsx - | OutputKind.Pynb -> - parseOptions - ||| MarkdownParseOptions.ParseCodeAsOther - //||| MarkdownParseOptions.ParseNonCodeAsOther + | OutputKind.Pynb -> parseOptions ||| MarkdownParseOptions.ParseCodeAsOther + //||| MarkdownParseOptions.ParseNonCodeAsOther | _ -> parseOptions let doc = @@ -428,7 +475,15 @@ type Literate private () = ) let ctx = - makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver mdlinkResolver + makeFormattingContext + outputKind + prefix + lineNumbers + generateAnchors + substitutions + tokenKindToCss + crefResolver + mdlinkResolver let doc = customizeDoc customizeDocument ctx doc let doc = downloadImagesForDoc imageSaver doc @@ -479,7 +534,15 @@ type Literate private () = ) let ctx = - makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions tokenKindToCss crefResolver mdlinkResolver + makeFormattingContext + outputKind + prefix + lineNumbers + generateAnchors + substitutions + tokenKindToCss + crefResolver + mdlinkResolver let doc = customizeDoc customizeDocument ctx doc let doc = downloadImagesForDoc imageSaver doc @@ -502,7 +565,18 @@ type Literate private () = let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) let outputKind = defaultArg outputKind OutputKind.Html - let ctx = makeFormattingContext outputKind prefix lineNumbers generateAnchors substitutions None crefResolver mdlinkResolver + + let ctx = + makeFormattingContext + outputKind + prefix + lineNumbers + generateAnchors + substitutions + None + crefResolver + mdlinkResolver + let res = Formatting.transformDocument doc output ctx SimpleTemplating.UseFileAsSimpleTemplate(res.Substitutions, template, output) diff --git a/src/FSharp.Formatting.Markdown/Markdown.fs b/src/FSharp.Formatting.Markdown/Markdown.fs index 5556201c7..4744e434e 100644 --- a/src/FSharp.Formatting.Markdown/Markdown.fs +++ b/src/FSharp.Formatting.Markdown/Markdown.fs @@ -101,7 +101,15 @@ type Markdown internal () = /// Transform Markdown text into HTML format. The result /// will be written to the provided TextWriter. - static member WriteHtml(markdownText: string, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = + static member WriteHtml + ( + markdownText: string, + writer: TextWriter, + ?newline, + ?substitutions, + ?crefResolver, + ?mdlinkResolver + ) = let doc = Markdown.Parse(markdownText, ?newline = newline) Markdown.WriteHtml( @@ -118,7 +126,16 @@ type Markdown internal () = static member ToHtml(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - Markdown.WriteHtml(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver=mdlinkResolver) + + Markdown.WriteHtml( + doc, + wr, + ?newline = newline, + ?substitutions = substitutions, + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver + ) + sb.ToString() /// Transform Markdown document into HTML format. @@ -126,7 +143,13 @@ type Markdown internal () = static member ToHtml(markdownText: string, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) - Markdown.ToHtml(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver=mdlinkResolver) + Markdown.ToHtml( + doc, + ?newline = newline, + ?substitutions = substitutions, + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver + ) /// Transform the provided MarkdownDocument into LaTeX /// format and write the result to a given writer. @@ -135,11 +158,27 @@ type Markdown internal () = let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - LatexFormatting.formatAsLatex writer doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs + + LatexFormatting.formatAsLatex + writer + doc.DefinedLinks + substitutions + newline + crefResolver + mdlinkResolver + doc.Paragraphs /// Transform Markdown document into LaTeX format. The result /// will be written to the provided TextWriter. - static member WriteLatex(markdownText, writer: TextWriter, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = + static member WriteLatex + ( + markdownText, + writer: TextWriter, + ?newline, + ?substitutions, + ?crefResolver, + ?mdlinkResolver + ) = let doc = Markdown.Parse(markdownText, ?newline = newline) Markdown.WriteLatex( @@ -156,14 +195,29 @@ type Markdown internal () = static member ToLatex(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let sb = new System.Text.StringBuilder() use wr = new StringWriter(sb) - Markdown.WriteLatex(doc, wr, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver = mdlinkResolver) + + Markdown.WriteLatex( + doc, + wr, + ?newline = newline, + ?substitutions = substitutions, + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver + ) + sb.ToString() /// Transform Markdown text into LaTeX format. The result will be returned as a string. static member ToLatex(markdownText: string, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = let doc = Markdown.Parse(markdownText, ?newline = newline) - Markdown.ToLatex(doc, ?newline = newline, ?substitutions = substitutions, ?crefResolver = crefResolver, ?mdlinkResolver = mdlinkResolver) + Markdown.ToLatex( + doc, + ?newline = newline, + ?substitutions = substitutions, + ?crefResolver = crefResolver, + ?mdlinkResolver = mdlinkResolver + ) /// Transform the provided MarkdownDocument into Pynb and return the result as a string. static member ToPynb(doc: MarkdownDocument, ?newline, ?substitutions, ?crefResolver, ?mdlinkResolver) = @@ -187,4 +241,11 @@ type Markdown internal () = let substitutions = defaultArg substitutions [] let crefResolver = defaultArg crefResolver (fun _ -> None) let mdlinkResolver = defaultArg mdlinkResolver (fun _ -> None) - MarkdownFormatting.formatAsMarkdown doc.DefinedLinks substitutions newline crefResolver mdlinkResolver doc.Paragraphs + + MarkdownFormatting.formatAsMarkdown + doc.DefinedLinks + substitutions + newline + crefResolver + mdlinkResolver + doc.Paragraphs diff --git a/src/fsdocs-tool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs index 3357eccd9..5698b6a2c 100644 --- a/src/fsdocs-tool/BuildCommand.fs +++ b/src/fsdocs-tool/BuildCommand.fs @@ -74,6 +74,7 @@ type internal DocContent Path.Combine(outputFolderRelativeToRoot, sprintf "%s.%s" basename ext) else Path.Combine(outputFolderRelativeToRoot, inputFileName) + let outputFileFullPath = Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFileRelativeToRoot)) outputFileRelativeToRoot, outputFileFullPath @@ -82,21 +83,38 @@ type internal DocContent |> Array.map (fun x -> x.TwoLetterISOLanguageName) |> Array.filter (fun x -> x.Length = 2) |> Array.distinct - - let makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap: Map<(string * OutputKind),string>, outputKind) (markdownReference: string) = - let markdownReferenceAsFullInputPathOpt = try Path.GetFullPath(markdownReference, inputFolderAsGiven) |> Some with _ -> None + + let makeMarkdownLinkResolver + (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap: Map<(string * OutputKind), string>, outputKind) + (markdownReference: string) + = + let markdownReferenceAsFullInputPathOpt = + try + Path.GetFullPath(markdownReference, inputFolderAsGiven) |> Some + with + | _ -> None + match markdownReferenceAsFullInputPathOpt with | None -> None | Some markdownReferenceFullInputPath -> - match fullPathFileMap.TryFind (markdownReferenceFullInputPath, outputKind) with + match fullPathFileMap.TryFind(markdownReferenceFullInputPath, outputKind) with | None -> None | Some markdownReferenceFullOutputPath -> try - let outputFolderFullPath = Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot)) - let uri = Uri(outputFolderFullPath+"/").MakeRelativeUri(Uri(markdownReferenceFullOutputPath)).ToString() + let outputFolderFullPath = + Path.GetFullPath(Path.Combine(rootOutputFolderAsGiven, outputFolderRelativeToRoot)) + + let uri = + Uri(outputFolderFullPath + "/") + .MakeRelativeUri(Uri(markdownReferenceFullOutputPath)) + .ToString() + Some uri - with _ -> - printfn $"Couldn't map markdown reference {markdownReference} that seemed to correspond to an input file" + with + | _ -> + printfn + $"Couldn't map markdown reference {markdownReference} that seemed to correspond to an input file" + None /// Prepare the map of input file to output file. This map is used to make substitutions through markdown @@ -104,9 +122,15 @@ type internal DocContent let prepFile (inputFileFullPath: string) (outputKind: OutputKind) outputFolderRelativeToRoot = [ let inputFileName = Path.GetFileName(inputFileFullPath) - if not (inputFileName.StartsWith(".")) && not (inputFileName.StartsWith "_template") then + if + not (inputFileName.StartsWith(".")) + && not (inputFileName.StartsWith "_template") + then let inputFileFullPath = Path.GetFullPath(inputFileFullPath) - let _relativeOutputFile, outputFileFullPath = getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot + + let _relativeOutputFile, outputFileFullPath = + getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot + yield ((inputFileFullPath, outputKind), outputFileFullPath) ] /// Likewise prepare the map of input files to output files @@ -129,7 +153,16 @@ type internal DocContent (Path.Combine(inputFolderAsGiven, subFolderName)) (Path.Combine(outputFolderRelativeToRoot, subFolderName)) ] - let processFile rootInputFolder (isOtherLang: bool) (inputFileFullPath: string) outputKind template outputFolderRelativeToRoot imageSaver mdlinkResolver = + let processFile + rootInputFolder + (isOtherLang: bool) + (inputFileFullPath: string) + outputKind + template + outputFolderRelativeToRoot + imageSaver + mdlinkResolver + = [ let name = Path.GetFileName(inputFileFullPath) if name.StartsWith(".") then @@ -156,7 +189,8 @@ type internal DocContent | OutputKind.Md when saveImages = Some true -> Some imageSaver | _ -> None - let outputFileRelativeToRoot, outputFileFullPath = getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot + let outputFileRelativeToRoot, outputFileFullPath = + getOutputFileNames inputFileFullPath outputKind outputFolderRelativeToRoot // Update only when needed - template or file or tool has changed @@ -351,11 +385,85 @@ type internal DocContent // Look for the four different kinds of content for input in inputs do - yield! processFile rootInputFolder isOtherLang input OutputKind.Html htmlTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Html)) - yield! processFile rootInputFolder isOtherLang input OutputKind.Latex texTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Latex)) - yield! processFile rootInputFolder isOtherLang input OutputKind.Pynb pynbTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Pynb)) - yield! processFile rootInputFolder isOtherLang input OutputKind.Fsx fsxTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Fsx)) - yield! processFile rootInputFolder isOtherLang input OutputKind.Md mdTemplate outputFolderRelativeToRoot imageSaver (makeMarkdownLinkResolver (inputFolderAsGiven, outputFolderRelativeToRoot, fullPathFileMap, OutputKind.Md)) + yield! + processFile + rootInputFolder + isOtherLang + input + OutputKind.Html + htmlTemplate + outputFolderRelativeToRoot + imageSaver + (makeMarkdownLinkResolver ( + inputFolderAsGiven, + outputFolderRelativeToRoot, + fullPathFileMap, + OutputKind.Html + )) + + yield! + processFile + rootInputFolder + isOtherLang + input + OutputKind.Latex + texTemplate + outputFolderRelativeToRoot + imageSaver + (makeMarkdownLinkResolver ( + inputFolderAsGiven, + outputFolderRelativeToRoot, + fullPathFileMap, + OutputKind.Latex + )) + + yield! + processFile + rootInputFolder + isOtherLang + input + OutputKind.Pynb + pynbTemplate + outputFolderRelativeToRoot + imageSaver + (makeMarkdownLinkResolver ( + inputFolderAsGiven, + outputFolderRelativeToRoot, + fullPathFileMap, + OutputKind.Pynb + )) + + yield! + processFile + rootInputFolder + isOtherLang + input + OutputKind.Fsx + fsxTemplate + outputFolderRelativeToRoot + imageSaver + (makeMarkdownLinkResolver ( + inputFolderAsGiven, + outputFolderRelativeToRoot, + fullPathFileMap, + OutputKind.Fsx + )) + + yield! + processFile + rootInputFolder + isOtherLang + input + OutputKind.Md + mdTemplate + outputFolderRelativeToRoot + imageSaver + (makeMarkdownLinkResolver ( + inputFolderAsGiven, + outputFolderRelativeToRoot, + fullPathFileMap, + OutputKind.Md + )) for subInputFolderFullPath in Directory.EnumerateDirectories(inputFolderAsGiven) do let subInputFolderName = Path.GetFileName(subInputFolderFullPath) @@ -1094,7 +1202,9 @@ type CoreBuildOptions(watch) = clean subdir let isOutputPathOK = - rootOutputFolderAsGiven <> "/" && rootOutputFolderAsGiven <> "." && rootOutputFolderFullPath <> rootInputFolderFullPath + rootOutputFolderAsGiven <> "/" + && rootOutputFolderAsGiven <> "." + && rootOutputFolderFullPath <> rootInputFolderFullPath && not (String.IsNullOrEmpty rootOutputFolderAsGiven) if isOutputPathOK then @@ -1259,7 +1369,11 @@ type CoreBuildOptions(watch) = docsQueued <- false if not this.noserver_option then - printfn "starting server on http://localhost:%d for content in %s" this.port_option rootOutputFolderFullPath + printfn + "starting server on http://localhost:%d for content in %s" + this.port_option + rootOutputFolderFullPath + Serve.startWebServer rootOutputFolderFullPath this.port_option if not this.nolaunch_option then diff --git a/tests/FSharp.Literate.Tests/DocContentTests.fs b/tests/FSharp.Literate.Tests/DocContentTests.fs new file mode 100644 index 000000000..8ccee60db --- /dev/null +++ b/tests/FSharp.Literate.Tests/DocContentTests.fs @@ -0,0 +1,63 @@ +module FSharp.Literate.Tests.DocContent + +open System.IO +open fsdocs +open NUnit.Framework +open FsUnitTyped + +do FSharp.Formatting.TestHelpers.enableLogging () + +// -------------------------------------------------------------------------------------- +// Test FSI evaluator +// -------------------------------------------------------------------------------------- + +let (</>) a b = Path.Combine(a, b) + +[<Test>] +let ``Can build doc content`` () = + let rootOutputFolderAsGiven = __SOURCE_DIRECTORY__ </> "output1" + let rootInputFolderAsGiven = __SOURCE_DIRECTORY__ </> "files" + + if Directory.Exists(rootOutputFolderAsGiven) then + Directory.Delete(rootOutputFolderAsGiven, true) + + let content = + DocContent( + rootOutputFolderAsGiven, + Map.empty, + lineNumbers = None, + fsiEvaluator = None, + substitutions = [], + saveImages = None, + watch = false, + root = "https://github.com", + crefResolver = (fun _ -> None) + ) + + let docModels = content.Convert(rootInputFolderAsGiven, None, []) + let globals = [] + + for (_thing, action) in docModels do + action globals + + // Check simple1.fsx --> simple1.html substititions + let html1 = File.ReadAllText(rootOutputFolderAsGiven </> "simple1.html") + let html2 = File.ReadAllText(rootOutputFolderAsGiven </> "simple2.html") + html1 |> shouldContainText "simple2.html" + html2 |> shouldContainText "simple1.html" + + // Check simple1.fsx --> simple1.ipynb substititions + let ipynb1 = File.ReadAllText(rootOutputFolderAsGiven </> "simple1.ipynb") + let ipynb2 = File.ReadAllText(rootOutputFolderAsGiven </> "simple2.ipynb") + ipynb1 |> shouldContainText "simple2.ipynb" + ipynb2 |> shouldContainText "simple1.ipynb" + + // Check fsx contents + let _fsx1 = File.ReadAllText(rootOutputFolderAsGiven </> "simple1.fsx") + let _fsx2 = File.ReadAllText(rootOutputFolderAsGiven </> "simple2.fsx") + + // Check md contents + let md1 = File.ReadAllText(rootOutputFolderAsGiven </> "simple1.md") + let md2 = File.ReadAllText(rootOutputFolderAsGiven </> "simple2.md") + md1 |> shouldContainText "simple2.md" + md2 |> shouldContainText "simple1.md" diff --git a/tests/FSharp.Literate.Tests/LiterateTests.fs b/tests/FSharp.Literate.Tests/LiterateTests.fs index c5e3de299..cb63a2e0a 100644 --- a/tests/FSharp.Literate.Tests/LiterateTests.fs +++ b/tests/FSharp.Literate.Tests/LiterateTests.fs @@ -962,7 +962,16 @@ let test = 42 let doc2 = Literate.FormatLiterateNodes(doc, outputKind = OutputKind.Html) - let html = Literate.ToHtml(doc2.With(formattedTips = ""), mdlinkResolver=(fun s -> if s = "A.fsx" then Some "A.html" else None)) + let html = + Literate.ToHtml( + doc2.With(formattedTips = ""), + mdlinkResolver = + (fun s -> + if s = "A.fsx" then + Some "A.html" + else + None) + ) html |> shouldContainText "A.html" @@ -975,7 +984,16 @@ let ``Formatted markdown transforms markdown links`` () = let doc = Literate.ParseMarkdownString(content, "." </> "A.md", getFormatAgent ()) - let html = Literate.ToHtml(doc.With(formattedTips = ""), mdlinkResolver=(fun s -> if s = "A.md" then Some "A.html" else None)) + let html = + Literate.ToHtml( + doc.With(formattedTips = ""), + mdlinkResolver = + (fun s -> + if s = "A.md" then + Some "A.html" + else + None) + ) html |> shouldContainText "A.html" diff --git a/tests/FSharp.Literate.Tests/files/_template.fsx b/tests/FSharp.Literate.Tests/files/_template.fsx new file mode 100644 index 000000000..e69de29bb diff --git a/tests/FSharp.Literate.Tests/files/_template.html b/tests/FSharp.Literate.Tests/files/_template.html new file mode 100644 index 000000000..01e1c3bcd --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/_template.html @@ -0,0 +1,83 @@ +<!DOCTYPE html> +<html lang="en"> + +<head> + <meta charset="utf-8"> + <title>{{fsdocs-page-title}} + + + + + + + + + + + + + + + + + + + + {{fsdocs-watch-script}} + + + + +
+ +
+
+ {{fsdocs-content}} + {{fsdocs-tooltips}} +
+ + + + + + + + +
+ + + + diff --git a/tests/FSharp.Literate.Tests/files/_template.ipynb b/tests/FSharp.Literate.Tests/files/_template.ipynb new file mode 100644 index 000000000..8b1378917 --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/_template.ipynb @@ -0,0 +1 @@ + diff --git a/tests/FSharp.Literate.Tests/files/_template.md b/tests/FSharp.Literate.Tests/files/_template.md new file mode 100644 index 000000000..e69de29bb diff --git a/tests/FSharp.Literate.Tests/files/_template.tex b/tests/FSharp.Literate.Tests/files/_template.tex new file mode 100644 index 000000000..37e3e6df7 --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/_template.tex @@ -0,0 +1,48 @@ +\documentclass{article} + +\usepackage{xcolor} +\usepackage{graphicx} +\usepackage{fancyvrb} +\usepackage{listings} +\usepackage[T1]{fontenc} +\usepackage{hyperref} +\usepackage{amsmath} + +\definecolor{officegreen}{rgb}{0, 0.5, 0} +\definecolor{navy}{rgb}{0, 0, 0.5} +\definecolor{linecolor}{rgb}{0.5, 0.6875, 0.6875} +\definecolor{outputcolor}{rgb}{0.375, 0.375, 0.375} + +\newcommand{\id}[1]{\textcolor{black}{#1}} +\newcommand{\com}[1]{\textcolor{officegreen}{#1}} +\newcommand{\inact}[1]{\textcolor{gray}{#1}} +\newcommand{\kwd}[1]{\textcolor{navy}{#1}} +\newcommand{\num}[1]{\textcolor{officegreen}{#1}} +\newcommand{\ops}[1]{\textcolor{purple}{#1}} +\newcommand{\prep}[1]{\textcolor{purple}{#1}} +\newcommand{\str}[1]{\textcolor{olive}{#1}} +\newcommand{\lines}[1]{\textcolor{linecolor}{#1}} +\newcommand{\fsi}[1]{\textcolor{outputcolor}{#1}} +\newcommand{\omi}[1]{\textcolor{gray}{#1}} + +% Overriding color and style of line numbers +\renewcommand{\theFancyVerbLine}{ +\lines{\small \arabic{FancyVerbLine}:}} + +\lstset{% + backgroundcolor=\color{gray!15}, + basicstyle=\ttfamily, + breaklines=true, + columns=fullflexible +} + +\title{{page-title}} +\date{} + +\begin{document} + +\maketitle + +{{fsdocs-content}} + +\end{document} \ No newline at end of file diff --git a/tests/FSharp.Literate.Tests/files/simple1.fsx b/tests/FSharp.Literate.Tests/files/simple1.fsx new file mode 100644 index 000000000..c3fbf4fe0 --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/simple1.fsx @@ -0,0 +1,20 @@ +(** +Heading +======= + +With some [hyperlink](http://tomasp.net) + +dont-substitute-in-inline-code: `{{fsdocs-source-basename}}` + +substitute-in-markdown: {{fsdocs-source-basename}} + +[ABC](http://substitute-in-link: {{fsdocs-source-basename}}) +[substitute-in-href-text: {{fsdocs-source-basename}}](http://google.com) + +Another [hyperlink](simple2.md) + +*) +let hello = "Code sample" + +let goodbye = + "substitute-in-fsx-code: {{fsdocs-source-basename}}" diff --git a/tests/FSharp.Literate.Tests/files/simple2.md b/tests/FSharp.Literate.Tests/files/simple2.md new file mode 100644 index 000000000..2cc166c08 --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/simple2.md @@ -0,0 +1,8 @@ +Heading +======= + +With some [hyperlink](http://tomasp.net) + + let hello = "Code sample" + +Another [hyperlink](simple1.fsx) From 6de8b1e4fab183bc96fd15bcb5e0ffce285e1167 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 19:51:12 +0000 Subject: [PATCH 3/9] formatting --- .config/dotnet-tools.json | 2 +- build.fsx | 3 +-- docs/apidocs.fsx | 3 +-- docs/evaluation.fsx | 6 ++---- docs/literate.fsx | 18 ++++++------------ src/FSharp.Formatting.ApiDocs/GenerateModel.fs | 2 +- src/FSharp.Formatting.Literate/Evaluator.fs | 4 ++-- .../MarkdownModel.fs | 4 ++-- src/fsdocs-tool/BuildCommand.fs | 8 ++++---- .../files/AttributesTestLib/Attributes.fs | 2 +- .../files/FsLib2/Library2.fs | 4 ++-- tests/FSharp.Literate.Tests/files/simple1.fsx | 3 +-- 12 files changed, 24 insertions(+), 35 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 82c931d16..5b93428a5 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -15,7 +15,7 @@ ] }, "fantomas-tool": { - "version": "4.6.0-alpha-005", + "version": "4.6.0-alpha-006", "commands": [ "fantomas" ] diff --git a/build.fsx b/build.fsx index 334ba6012..6edc67b87 100644 --- a/build.fsx +++ b/build.fsx @@ -37,8 +37,7 @@ let artifactsDir = __SOURCE_DIRECTORY__ @@ "artifacts" // Read release notes document let release = ReleaseNotes.load "RELEASE_NOTES.md" -let projectRepo = - "https://github.com/fsprojects/FSharp.Formatting" +let projectRepo = "https://github.com/fsprojects/FSharp.Formatting" // -------------------------------------------------------------------------------------- // Generate assembly info files with the right version & up-to-date information diff --git a/docs/apidocs.fsx b/docs/apidocs.fsx index f66d3e5fc..237d10392 100644 --- a/docs/apidocs.fsx +++ b/docs/apidocs.fsx @@ -254,8 +254,7 @@ open System.IO For example the `cref:M:FSharp.Formatting.ApiDocs.ApiDocs.GenerateHtml` method: *) -let file = - Path.Combine(root, "bin/YourLibrary.dll") +let file = Path.Combine(root, "bin/YourLibrary.dll") let input = ApiDocInput.FromFile(file) diff --git a/docs/evaluation.fsx b/docs/evaluation.fsx index aa5d2cf8c..2327b6901 100644 --- a/docs/evaluation.fsx +++ b/docs/evaluation.fsx @@ -119,8 +119,7 @@ let a = 10 // Create evaluator and parse script let fsi = FsiEvaluator() -let doc = - Literate.ParseScriptString(content, fsiEvaluator = fsi) +let doc = Literate.ParseScriptString(content, fsiEvaluator = fsi) Literate.ToHtml(doc) (** @@ -184,8 +183,7 @@ let listy = let test = ["one";"two";"three"] (*** include-value:test ***)""" -let docOl = - Literate.ParseScriptString(listy, fsiEvaluator = fsiEvaluator) +let docOl = Literate.ParseScriptString(listy, fsiEvaluator = fsiEvaluator) Literate.ToHtml(docOl) (** diff --git a/docs/literate.fsx b/docs/literate.fsx index c809fa009..71952e8c4 100644 --- a/docs/literate.fsx +++ b/docs/literate.fsx @@ -223,13 +223,11 @@ open FSharp.Formatting.Literate let source = __SOURCE_DIRECTORY__ let template = Path.Combine(source, "template.html") -let script = - Path.Combine(source, "../docs/script.fsx") +let script = Path.Combine(source, "../docs/script.fsx") Literate.ConvertScriptFile(script, template) -let doc = - Path.Combine(source, "../docs/document.md") +let doc = Path.Combine(source, "../docs/document.md") Literate.ConvertMarkdownFile(doc, template) @@ -257,13 +255,11 @@ example shows how to call the methods to generate LaTeX documents: *) let templateTex = Path.Combine(source, "template.tex") -let scriptTex = - Path.Combine(source, "../docs/script.fsx") +let scriptTex = Path.Combine(source, "../docs/script.fsx") Literate.ConvertScriptFile(scriptTex, templateTex, outputKind = OutputKind.Latex) -let docTex = - Path.Combine(source, "../docs/document.md") +let docTex = Path.Combine(source, "../docs/document.md") Literate.ConvertMarkdownFile(docTex, templateTex, outputKind = OutputKind.Latex) @@ -275,13 +271,11 @@ by setting the named parameter `format` to `OutputKind.Pynb`: *) // Process script file, Markdown document and a directory -let scriptPynb = - Path.Combine(source, "../docs/script.fsx") +let scriptPynb = Path.Combine(source, "../docs/script.fsx") Literate.ConvertScriptFile(scriptPynb, outputKind = OutputKind.Pynb) -let docPynb = - Path.Combine(source, "../docs/document.md") +let docPynb = Path.Combine(source, "../docs/document.md") Literate.ConvertMarkdownFile(docPynb, outputKind = OutputKind.Pynb) diff --git a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs index e5252869a..665793f98 100644 --- a/src/FSharp.Formatting.ApiDocs/GenerateModel.fs +++ b/src/FSharp.Formatting.ApiDocs/GenerateModel.fs @@ -1406,7 +1406,7 @@ module internal SymbolReader = Substitutions = substitutions } let inline private getCompiledName (s: ^a :> FSharpSymbol) = - let compiledName = (^a: (member CompiledName : string) (s)) + let compiledName = (^a: (member CompiledName: string) (s)) match compiledName = s.DisplayName with | true -> None diff --git a/src/FSharp.Formatting.Literate/Evaluator.fs b/src/FSharp.Formatting.Literate/Evaluator.fs index dfd2fb173..b3575c7ba 100644 --- a/src/FSharp.Formatting.Literate/Evaluator.fs +++ b/src/FSharp.Formatting.Literate/Evaluator.fs @@ -66,10 +66,10 @@ type FsiEvaluationFailedInfo = type IFsiEvaluator = /// Called to format some part of evaluation result generated by FSI - abstract Format : result: IFsiEvaluationResult * kind: FsiEmbedKind * executionCount: int -> MarkdownParagraphs + abstract Format: result: IFsiEvaluationResult * kind: FsiEmbedKind * executionCount: int -> MarkdownParagraphs /// Called to evaluate a snippet - abstract Evaluate : code: string * asExpression: bool * file: string option -> IFsiEvaluationResult + abstract Evaluate: code: string * asExpression: bool * file: string option -> IFsiEvaluationResult /// Represents a simple (fake) event loop for the 'fsi' object type private NoOpFsiEventLoop() = diff --git a/src/FSharp.Formatting.Markdown/MarkdownModel.fs b/src/FSharp.Formatting.Markdown/MarkdownModel.fs index 8dd67cbcb..5cdb0ee1d 100644 --- a/src/FSharp.Formatting.Markdown/MarkdownModel.fs +++ b/src/FSharp.Formatting.Markdown/MarkdownModel.fs @@ -48,7 +48,7 @@ type MarkdownSpans = MarkdownSpan list /// Provides an extensibility point for adding custom kinds of spans into a document /// (MarkdownEmbedSpans values can be embedded using MarkdownSpan.EmbedSpans) type MarkdownEmbedSpans = - abstract Render : unit -> MarkdownSpans + abstract Render: unit -> MarkdownSpans /// A paragraph represents a (possibly) multi-line element of a Markdown document. /// Paragraphs are headings, inline paragraphs, code blocks, lists, quotations, tables and @@ -111,7 +111,7 @@ type MarkdownTableRow = list /// Provides an extensibility point for adding custom kinds of paragraphs into a document /// (MarkdownEmbedParagraphs values can be embedded using MarkdownParagraph.EmbedParagraphs) type MarkdownEmbedParagraphs = - abstract Render : unit -> MarkdownParagraphs + abstract Render: unit -> MarkdownParagraphs module Dsl = let ``#`` value = Heading(1, value, None) diff --git a/src/fsdocs-tool/BuildCommand.fs b/src/fsdocs-tool/BuildCommand.fs index 5698b6a2c..c10526afd 100644 --- a/src/fsdocs-tool/BuildCommand.fs +++ b/src/fsdocs-tool/BuildCommand.fs @@ -1390,16 +1390,16 @@ type CoreBuildOptions(watch) = if ok then 0 else 1 - abstract noserver_option : bool + abstract noserver_option: bool default x.noserver_option = false - abstract nolaunch_option : bool + abstract nolaunch_option: bool default x.nolaunch_option = false - abstract open_option : string + abstract open_option: string default x.open_option = "" - abstract port_option : int + abstract port_option: int default x.port_option = 0 [] diff --git a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs index f9d0562c1..82c90b065 100644 --- a/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs +++ b/tests/FSharp.ApiDocs.Tests/files/AttributesTestLib/Attributes.fs @@ -45,7 +45,7 @@ module MultipleAttributesModule = [] type AttributeInterface = [] - abstract TestMember : int -> int -> int + abstract TestMember: int -> int -> int [] type AttributeClass() = diff --git a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs index 4dddd61e2..16934962e 100644 --- a/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs +++ b/tests/FSharp.ApiDocs.Tests/files/FsLib2/Library2.fs @@ -53,7 +53,7 @@ module Nested = let f4 x : OtherType = x * 5 type ITest_Issue229 = - abstract member Name : string + abstract member Name: string type Test_Issue229(name) = /// instance comment @@ -65,7 +65,7 @@ type Test_Issue229(name) = type Test_Issue287() = /// Function Foo! - abstract member Foo : int -> unit + abstract member Foo: int -> unit /// Empty function for signature default x.Foo a = () diff --git a/tests/FSharp.Literate.Tests/files/simple1.fsx b/tests/FSharp.Literate.Tests/files/simple1.fsx index c3fbf4fe0..d7302b231 100644 --- a/tests/FSharp.Literate.Tests/files/simple1.fsx +++ b/tests/FSharp.Literate.Tests/files/simple1.fsx @@ -16,5 +16,4 @@ Another [hyperlink](simple2.md) *) let hello = "Code sample" -let goodbye = - "substitute-in-fsx-code: {{fsdocs-source-basename}}" +let goodbye = "substitute-in-fsx-code: {{fsdocs-source-basename}}" From 84d4dd5c462635964a2ca083070d1704344c8d15 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 19:59:19 +0000 Subject: [PATCH 4/9] complete testing --- .../FSharp.Literate.Tests/DocContentTests.fs | 25 ++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/tests/FSharp.Literate.Tests/DocContentTests.fs b/tests/FSharp.Literate.Tests/DocContentTests.fs index 8ccee60db..1e802f9c6 100644 --- a/tests/FSharp.Literate.Tests/DocContentTests.fs +++ b/tests/FSharp.Literate.Tests/DocContentTests.fs @@ -52,7 +52,7 @@ let ``Can build doc content`` () = ipynb1 |> shouldContainText "simple2.ipynb" ipynb2 |> shouldContainText "simple1.ipynb" - // Check fsx contents + // Check fsx exists let _fsx1 = File.ReadAllText(rootOutputFolderAsGiven "simple1.fsx") let _fsx2 = File.ReadAllText(rootOutputFolderAsGiven "simple2.fsx") @@ -61,3 +61,26 @@ let ``Can build doc content`` () = let md2 = File.ReadAllText(rootOutputFolderAsGiven "simple2.md") md1 |> shouldContainText "simple2.md" md2 |> shouldContainText "simple1.md" + + + // Check in-folder1.fsx --> in-folder1.html substititions + let f1html1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.html") + let f2html2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.html") + f1html1 |> shouldContainText """href="../folder2/in-folder2.html">""" + f2html2 |> shouldContainText """href="../folder1/in-folder1.html">""" + + // Check in-folder1.fsx --> in-folder1.ipynb substititions + let f1ipynb1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.ipynb") + let f2ipynb2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.ipynb") + f1ipynb1 |> shouldContainText """../folder2/in-folder2.ipynb""" + f2ipynb2 |> shouldContainText """../folder1/in-folder1.ipynb""" + + // Check fsx exists + let _f1fsx1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.fsx") + let _f2fsx2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.fsx") + + // Check md contents + let f1md1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.md") + let f2md2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.md") + f1md1 |> shouldContainText """../folder2/in-folder2.md""" + f2md2 |> shouldContainText """../folder1/in-folder1.md""" From d0791d5283e91799470516dff0f297b7ec0b2600 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 20:01:44 +0000 Subject: [PATCH 5/9] docs --- RELEASE_NOTES.md | 4 ++++ docs/content.fsx | 10 ++++++++++ 2 files changed, 14 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e23c3d704..5d7305254 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,3 +1,7 @@ +## 12.0.0 + +* [Allow input-->output link translation](https://github.com/fsprojects/FSharp.Formatting/pull/718) + ## 11.5.1 * [Allow user-set ids for xmldoc example nodes](https://github.com/fsprojects/FSharp.Formatting/pull/704) diff --git a/docs/content.fsx b/docs/content.fsx index de42531a8..5356f233f 100644 --- a/docs/content.fsx +++ b/docs/content.fsx @@ -97,7 +97,17 @@ The `categoryindex` determines the ordering of categories. The `index` determines the ordering of within each category. The `title` is used in the navigation bar instead of any title inferred from the document. +## Link Translation for Inputs +If an input is used in markdown as a target of a markdown direct link then that is replaced by the output file. For example: + + [Some Text](some-file.md) + +becomes + + [Some Text](some-file.html) + +if `some-file.md` is one of the inputs. ## Multi-language Content From 68d01c395f217037325242236e3f453493b60758 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 21:38:58 +0000 Subject: [PATCH 6/9] missing files --- .../files/folder1/in-folder1.fsx | 19 +++++++++++++++++++ .../files/folder2/in-folder2.md | 8 ++++++++ 2 files changed, 27 insertions(+) create mode 100644 tests/FSharp.Literate.Tests/files/folder1/in-folder1.fsx create mode 100644 tests/FSharp.Literate.Tests/files/folder2/in-folder2.md diff --git a/tests/FSharp.Literate.Tests/files/folder1/in-folder1.fsx b/tests/FSharp.Literate.Tests/files/folder1/in-folder1.fsx new file mode 100644 index 000000000..c3f82e1be --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/folder1/in-folder1.fsx @@ -0,0 +1,19 @@ +(** +Heading +======= + +With some [hyperlink](http://tomasp.net) + +dont-substitute-in-inline-code: `{{fsdocs-source-basename}}` + +substitute-in-markdown: {{fsdocs-source-basename}} + +[ABC](http://substitute-in-link: {{fsdocs-source-basename}}) +[substitute-in-href-text: {{fsdocs-source-basename}}](http://google.com) + +Another [hyperlink](../folder2/in-folder2.md) + +*) +let hello = "Code sample" + +let goodbye = "substitute-in-fsx-code: {{fsdocs-source-basename}}" diff --git a/tests/FSharp.Literate.Tests/files/folder2/in-folder2.md b/tests/FSharp.Literate.Tests/files/folder2/in-folder2.md new file mode 100644 index 000000000..cba80258c --- /dev/null +++ b/tests/FSharp.Literate.Tests/files/folder2/in-folder2.md @@ -0,0 +1,8 @@ +Heading +======= + +With some [hyperlink](http://tomasp.net) + + let hello = "Code sample" + +Another [hyperlink](../folder1/in-folder1.fsx) From 3ae2af455c138863ed0f879d653f304ebdf1e9e6 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 21:54:12 +0000 Subject: [PATCH 7/9] use matching versions --- .paket/Paket.Restore.targets | 63 +------------------ paket.dependencies | 2 +- paket.lock | 2 +- .../FSharp.Literate.Tests/DocContentTests.fs | 12 ++-- 4 files changed, 13 insertions(+), 66 deletions(-) diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 510d60d44..8d37e28bc 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -289,16 +289,14 @@ $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true - false - true false - true + true false true false - true + true false - true + true $(PaketIntermediateOutputPath)\$(Configuration) $(PaketIntermediateOutputPath) @@ -316,53 +314,6 @@ - = 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Locator (>= 1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Ionide.ProjInfo.Sln (0.55) + Ionide.ProjInfo.Sln (0.53.1) Microsoft.Build (16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Framework (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) Microsoft.NET.StringTools (>= 1.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) diff --git a/tests/FSharp.Literate.Tests/DocContentTests.fs b/tests/FSharp.Literate.Tests/DocContentTests.fs index 1e802f9c6..c32a9b507 100644 --- a/tests/FSharp.Literate.Tests/DocContentTests.fs +++ b/tests/FSharp.Literate.Tests/DocContentTests.fs @@ -53,8 +53,10 @@ let ``Can build doc content`` () = ipynb2 |> shouldContainText "simple1.ipynb" // Check fsx exists - let _fsx1 = File.ReadAllText(rootOutputFolderAsGiven "simple1.fsx") - let _fsx2 = File.ReadAllText(rootOutputFolderAsGiven "simple2.fsx") + let fsx1 = File.ReadAllText(rootOutputFolderAsGiven "simple1.fsx") + let fsx2 = File.ReadAllText(rootOutputFolderAsGiven "simple2.fsx") + fsx1 |> shouldContainText "simple2.fsx" + fsx2 |> shouldContainText "simple1.fsx" // Check md contents let md1 = File.ReadAllText(rootOutputFolderAsGiven "simple1.md") @@ -76,8 +78,10 @@ let ``Can build doc content`` () = f2ipynb2 |> shouldContainText """../folder1/in-folder1.ipynb""" // Check fsx exists - let _f1fsx1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.fsx") - let _f2fsx2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.fsx") + let f1fsx1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.fsx") + let f2fsx2 = File.ReadAllText(rootOutputFolderAsGiven "folder2" "in-folder2.fsx") + f1fsx1 |> shouldContainText """../folder2/in-folder2.fsx""" + f2fsx2 |> shouldContainText """../folder1/in-folder1.fsx""" // Check md contents let f1md1 = File.ReadAllText(rootOutputFolderAsGiven "folder1" "in-folder1.md") From 697a7d83078c4d6da799e59428498a669576272c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sat, 6 Nov 2021 23:53:23 +0000 Subject: [PATCH 8/9] try to update FCS and net6 --- .config/dotnet-tools.json | 2 +- .paket/Paket.Restore.targets | 79 ++++++++++++++++++--- paket.dependencies | 6 +- paket.lock | 110 ++++++++++++++--------------- src/fsdocs-tool/ProjectCracker.fs | 87 +++++++++++++++++++++-- src/fsdocs-tool/fsdocs-tool.fsproj | 14 ++-- 6 files changed, 220 insertions(+), 78 deletions(-) diff --git a/.config/dotnet-tools.json b/.config/dotnet-tools.json index 5b93428a5..1356dd027 100644 --- a/.config/dotnet-tools.json +++ b/.config/dotnet-tools.json @@ -9,7 +9,7 @@ ] }, "paket": { - "version": "6.0.0-rc002", + "version": "6.2.1", "commands": [ "paket" ] diff --git a/.paket/Paket.Restore.targets b/.paket/Paket.Restore.targets index 8d37e28bc..4deb15bcd 100644 --- a/.paket/Paket.Restore.targets +++ b/.paket/Paket.Restore.targets @@ -159,7 +159,7 @@ This value should match the version in the props generated by paket If they differ, this means we need to do a restore in order to ensure correct dependencies --> - + true @@ -236,13 +236,16 @@ $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[0]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[1]) $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[4]) - $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[5]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[6]) + $([System.String]::Copy('%(PaketReferencesFileLines.Identity)').Split(',')[7]) %(PaketReferencesFileLinesInfo.PackageVersion) All - runtime - runtime + runtime + $(ExcludeAssets);contentFiles + $(ExcludeAssets);build;buildMultitargeting;buildTransitive true true @@ -289,14 +292,16 @@ $(MSBuildProjectDirectory)/$(MSBuildProjectFile) true + false + true false - true + true false true false - true + true false - true + true $(PaketIntermediateOutputPath)\$(Configuration) $(PaketIntermediateOutputPath) @@ -314,6 +319,55 @@ + + + PackageLicenseExpressionVersion="$(PackageLicenseExpressionVersion)" + NoDefaultExcludes="$(NoDefaultExcludes)" /> = 4.7 lowest_matching:true @@ -10,8 +10,8 @@ nuget CommandLineParser ~> 2.8 nuget Microsoft.Build.Framework nuget Microsoft.Build.Tasks.Core nuget Microsoft.Build.Utilities.Core -nuget Ionide.ProjInfo 0.53.1 -nuget Ionide.ProjInfo.Sln 0.53.1 +nuget Ionide.ProjInfo +nuget Ionide.ProjInfo.Sln nuget Newtonsoft.Json nuget Suave nuget System.Memory diff --git a/paket.lock b/paket.lock index 014b4ad51..a53203eae 100644 --- a/paket.lock +++ b/paket.lock @@ -37,13 +37,13 @@ NUGET FSharp.Core (>= 4.2.3) NETStandard.Library (>= 2.0.3) NUnit (>= 3.12 < 4.0) - Ionide.ProjInfo (0.53.1) - FSharp.Core (>= 5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Ionide.ProjInfo.Sln (>= 0.53.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build.Framework (>= 16.10) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Microsoft.Build.Locator (>= 1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) - Ionide.ProjInfo.Sln (0.53.1) + Ionide.ProjInfo (0.55) + FSharp.Core (>= 6.0.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + Ionide.ProjInfo.Sln (>= 0.55) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + Microsoft.Build (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + Microsoft.Build.Framework (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + SemanticVersioning (>= 2.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) + Ionide.ProjInfo.Sln (0.55) Microsoft.Build (16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Framework (>= 16.11) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) Microsoft.NET.StringTools (>= 1.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) @@ -57,7 +57,6 @@ NUGET System.Threading.Tasks.Dataflow (>= 4.9) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net472)) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Framework (16.11) System.Security.Permissions (>= 4.7) - Microsoft.Build.Locator (1.4.1) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Microsoft.Build.Tasks.Core (16.11) Microsoft.Build.Framework (>= 16.11) Microsoft.Build.Utilities.Core (>= 16.11) @@ -110,7 +109,7 @@ NUGET Microsoft.NETCore.Targets (>= 1.1) System.Runtime (>= 4.3) Microsoft.Win32.Registry (5.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.1) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= monoandroid) (< netstandard1.3)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.1) System.Memory (>= 4.5.4) - restriction: || (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.1) System.Security.AccessControl (>= 5.0) System.Security.Principal.Windows (>= 5.0) @@ -166,6 +165,7 @@ NUGET runtime.ubuntu.16.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.16.10-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) runtime.ubuntu.18.04-x64.runtime.native.System.Security.Cryptography.OpenSsl (4.3.3) + SemanticVersioning (2.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= net5.0)) Suave (2.6.1) FSharp.Core System.Buffers (4.5.1) @@ -196,7 +196,7 @@ NUGET System.Runtime (>= 4.3) System.Diagnostics.DiagnosticSource (5.0.1) System.Memory (>= 4.5.4) - restriction: || (&& (== net5.0) (>= net45) (< netstandard1.3)) (&& (== net5.0) (>= net46)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.1) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net45) (< netstandard1.3)) (&& (== net5.0) (>= net46)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netcoreapp3.0)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.1) + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (== net5.0) (>= monoandroid) (< netstandard1.1)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net45) (< netstandard1.3)) (&& (== net5.0) (>= net46)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (< netcoreapp3.0)) (&& (== net5.0) (< netstandard2.0)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.1) System.Diagnostics.Process (4.3) Microsoft.NETCore.Platforms (>= 1.1) Microsoft.Win32.Primitives (>= 4.3) @@ -236,7 +236,7 @@ NUGET System.Drawing.Common (5.0.2) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp3.0)) Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (== net5.0) (&& (== netstandard2.1) (>= netcoreapp2.0)) (&& (== netstandard2.1) (>= netcoreapp3.0)) System.Formats.Asn1 (5.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.1) + System.Buffers (>= 4.5.1) - restriction: || (&& (== net5.0) (>= monoandroid) (< netstandard2.0)) (&& (== net5.0) (>= monotouch)) (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (>= xamarinios)) (&& (== net5.0) (>= xamarinmac)) (&& (== net5.0) (>= xamarintvos)) (&& (== net5.0) (>= xamarinwatchos)) (== netstandard2.1) System.Memory (>= 4.5.4) - restriction: || (&& (== net5.0) (>= net461)) (&& (== net5.0) (< netcoreapp2.0)) (&& (== net5.0) (< netcoreapp2.1)) (&& (== net5.0) (>= uap10.1)) (== netstandard2.1) System.Globalization (4.3) Microsoft.NETCore.Platforms (>= 1.1) @@ -730,7 +730,7 @@ NUGET FSharp.Core (>= 4.7.2) - restriction: >= netstandard2.0 System.Reactive (>= 5.0) - restriction: >= netstandard2.0 FSharp.Core (4.7.2) - Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) + Microsoft.Bcl.AsyncInterfaces (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< netstandard2.1)) Microsoft.Build (16.11) - restriction: >= netstandard2.0 Microsoft.Build.Framework (>= 16.11) - restriction: || (>= net472) (>= net5.0) @@ -773,14 +773,14 @@ NUGET Microsoft.NET.StringTools (1.0) - restriction: >= netstandard2.0 System.Memory (>= 4.5.4) - restriction: >= netstandard2.0 System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: >= netstandard2.0 - Microsoft.NETCore.Platforms (5.0.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (>= netcoreapp2.0) (>= xamarinios)) (&& (>= netcoreapp2.0) (>= xamarinmac)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (>= netcoreapp2.1) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Platforms (5.0.4) - restriction: || (&& (>= monoandroid) (>= netcoreapp2.0) (< netstandard1.3)) (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= net5.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netcoreapp2.0)) (&& (>= net461) (>= netcoreapp2.0)) (&& (>= netcoreapp2.0) (>= uap10.1)) (&& (>= netcoreapp2.0) (>= xamarinios)) (&& (>= netcoreapp2.0) (>= xamarinmac)) (&& (>= netcoreapp2.0) (>= xamarintvos)) (&& (>= netcoreapp2.0) (>= xamarinwatchos)) (>= netcoreapp2.1) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) Microsoft.NETCore.Targets (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netstandard1.2) (>= netstandard2.0) (< win8)) (&& (< monoandroid) (< net45) (< netstandard1.3) (>= netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (< netstandard1.5) (>= netstandard2.0) (< win8) (< wpa81)) Microsoft.VisualStudio.Setup.Configuration.Interop (1.16.30) - restriction: >= net472 Microsoft.Win32.Registry (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= monotouch) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) - System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Security.AccessControl (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (>= netcoreapp2.0)) (>= monotouch) (&& (< net46) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.1) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) Microsoft.Win32.SystemEvents (5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 Mono.Posix.NETStandard (1.0) - restriction: >= netstandard2.0 @@ -805,80 +805,80 @@ NUGET NuGet.Protocol (5.11) - restriction: >= netstandard2.0 NuGet.Packaging (>= 5.11) - restriction: >= netstandard2.0 NuGet.Versioning (5.11) - restriction: >= netstandard2.0 - System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Buffers (4.5.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netstandard2.0)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.CodeDom (5.0) - restriction: && (< net472) (>= netstandard2.0) System.Collections.Immutable (5.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard2.0)) (>= net461) (>= uap10.1) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.3) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard2.0)) (>= net461) (>= uap10.1) System.Configuration.ConfigurationManager (5.0) - restriction: >= netstandard2.0 - System.Security.Cryptography.ProtectedData (>= 5.0) - restriction: && (< monoandroid) (< net461) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Cryptography.ProtectedData (>= 5.0) - restriction: && (< net461) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Permissions (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (>= netstandard2.0) (>= xamarintvos) (>= xamarinwatchos) System.Drawing.Common (5.0.2) - restriction: >= netcoreapp3.0 Microsoft.Win32.SystemEvents (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0) (< netstandard2.1)) (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net5.0) (>= uap10.1)) (&& (>= net5.0) (>= xamarintvos)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (>= xamarinwatchos)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Formats.Asn1 (5.0) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netstandard1.3)) (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (>= monotouch) (>= net5.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (>= net5.0) (< netcoreapp2.0)) (&& (>= net5.0) (>= uap10.1)) (&& (>= net5.0) (>= xamarintvos)) (&& (>= net5.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (>= xamarinwatchos)) (&& (< netcoreapp2.0) (>= netstandard2.1)) (>= netcoreapp3.0) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) System.IO (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (>= netstandard2.0) (>= uap10.1)) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (< uap10.1) (>= wpa81)) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Numerics.Vectors (>= 4.5) - restriction: >= net461 - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Numerics.Vectors (4.5) - restriction: || (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= net5.0)) (>= net472) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (>= monoandroid) (< netstandard1.1)) (&& (< monoandroid) (< net45) (>= netstandard1.1) (< netstandard2.0) (< win8) (< wpa81)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (< monoandroid) (< netstandard1.1) (>= portable-net45+win8+wpa81) (< win8)) (>= monotouch) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= net461) (&& (< netstandard1.1) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Numerics.Vectors (4.5) - restriction: || (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Reactive (5.0) - restriction: >= netstandard2.0 System.Runtime.InteropServices.WindowsRuntime (>= 4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (>= net472) (&& (< netcoreapp3.1) (>= netstandard2.0)) (>= uap10.1) System.Reflection.Metadata (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) System.Resources.Extensions (5.0) - restriction: >= netstandard2.0 - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) + System.Memory (>= 4.5.4) - restriction: || (>= net461) (&& (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Runtime (4.3.1) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp3.1) (>= netstandard2.0) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) - Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) - System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) + Microsoft.NETCore.Platforms (>= 1.1.1) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Targets (>= 1.1.3) - restriction: || (&& (< monoandroid) (< net45) (>= netstandard1.0) (< netstandard1.2) (< win8) (< wp8)) (&& (< monoandroid) (< net45) (>= netstandard1.2) (< netstandard1.3) (< win8) (< wpa81)) (&& (< monoandroid) (< net45) (>= netstandard1.3) (< netstandard1.5) (< win8) (< wpa81)) (&& (< monotouch) (< net45) (>= netstandard1.5) (< win8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Runtime.CompilerServices.Unsafe (5.0) - restriction: || (&& (< monoandroid) (< netstandard1.0) (>= netstandard2.0) (< win8)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= netstandard2.0)) (>= net472) (>= net5.0) (&& (< netstandard1.0) (>= netstandard2.0) (>= win8)) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= wp8)) System.Runtime.InteropServices.WindowsRuntime (4.3) - restriction: && (< net472) (< netcoreapp3.1) (>= netstandard2.0) System.Runtime (>= 4.3) - restriction: && (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< win8) (< wp8) (< wpa81) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.AccessControl (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.AccessControl (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: >= netcoreapp2.0 System.Security.Principal.Windows (>= 5.0) - restriction: || (&& (>= net46) (< netstandard2.0)) (&& (< net46) (>= netstandard1.3) (< netstandard2.0) (< uap10.1)) (&& (< net46) (>= netstandard2.0)) (>= net461) (>= netcoreapp2.0) System.Security.Cryptography.Algorithms (4.3.1) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) - System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) - System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) - System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) - Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.IO (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Runtime (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Security.Cryptography.Encoding (>= 4.3) - restriction: || (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net463) + System.Security.Cryptography.Primitives (>= 4.3) - restriction: || (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6)) (&& (< monotouch) (< net46) (>= netstandard1.6) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< netstandard1.6)) (>= net463) + System.Security.Cryptography.Cng (5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< net472) (>= netstandard2.0)) (>= net5.0) (&& (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + Microsoft.NETCore.Platforms (>= 5.0) - restriction: && (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) System.Formats.Asn1 (>= 5.0) - restriction: && (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) System.Security.Cryptography.Algorithms (>= 4.3.1) - restriction: || (&& (< monoandroid) (< monotouch) (< net46) (>= netstandard1.6) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net46) (>= netstandard1.3) (< netstandard1.4)) (&& (< monoandroid) (< net46) (>= netstandard1.4) (< netstandard1.6) (< uap10.1)) (&& (>= net46) (< netstandard1.4)) (&& (>= net461) (< net462) (< netstandard1.6)) (&& (>= net462) (< netstandard1.6)) (>= net47) System.Security.Cryptography.Encoding (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) - System.Security.Cryptography.Pkcs (5.0.1) - restriction: || (&& (>= monoandroid) (>= netstandard2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) - System.Buffers (>= 4.5.1) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Formats.Asn1 (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (< netstandard2.1)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1)) (>= monotouch) (>= netcoreapp3.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) - System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Security.Cryptography.Pkcs (5.0.1) - restriction: || (&& (>= monotouch) (>= netstandard2.0)) (&& (< net461) (>= netstandard2.0)) (&& (< net472) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Buffers (>= 4.5.1) - restriction: && (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos) + System.Formats.Asn1 (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3)) (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (>= monotouch) (&& (< netcoreapp2.0) (>= netstandard2.1)) (>= netcoreapp3.0) (>= uap10.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Security.Cryptography.Cng (>= 5.0) - restriction: || (&& (< monoandroid) (< net46) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netstandard2.1) (< xamarintvos) (< xamarinwatchos)) (&& (< netcoreapp2.0) (>= netstandard2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Security.Cryptography.Primitives (4.3) - restriction: || (&& (< monoandroid) (< net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< monoandroid) (< net46) (< netstandard1.6) (>= netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netstandard1.4)) (&& (< monoandroid) (>= net5.0) (< netstandard1.6)) (&& (< monoandroid) (>= net5.0) (< netstandard2.0) (< xamarintvos) (< xamarinwatchos)) (&& (>= net46) (>= net5.0) (< netstandard1.4)) (&& (>= net46) (< netstandard1.4) (>= netstandard2.0)) (&& (< net46) (>= net461) (< netstandard1.6) (>= netstandard2.0)) (&& (< net46) (>= net47) (>= netstandard2.0)) (&& (>= net461) (< net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net461) (>= net5.0) (< netstandard1.4)) (&& (>= net461) (>= net5.0) (< netstandard1.6)) (&& (>= net461) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (>= net5.0) (< netstandard1.4)) (&& (>= net462) (>= net5.0) (< netstandard1.6)) (&& (>= net462) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net462) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net463) (>= net5.0) (< netstandard1.4)) (&& (>= net463) (>= net5.0) (< netstandard1.6)) (&& (>= net463) (>= net5.0) (< netstandard2.0)) (&& (>= net463) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net463) (< netstandard1.6) (>= netstandard2.0)) (&& (>= net47) (< net472) (>= netstandard2.0)) (&& (>= net47) (>= net5.0)) (&& (>= net47) (< netstandard1.4) (>= netstandard2.0)) (&& (>= net47) (< netstandard1.6) (>= netstandard2.0)) - System.Security.Cryptography.ProtectedData (5.0) - restriction: || (&& (< monoandroid) (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< net45) (>= netstandard2.0)) (&& (< net461) (>= net472)) + System.Security.Cryptography.ProtectedData (5.0) - restriction: || (&& (< net45) (>= netstandard2.0)) (&& (< net461) (>= net472)) (&& (>= net5.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) System.Security.Cryptography.Xml (5.0) - restriction: && (< net472) (>= netstandard2.0) - System.Memory (>= 4.5.4) - restriction: && (< monoandroid) (< net461) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) - System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (&& (< net461) (>= netstandard2.0)) (>= netcoreapp2.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) + System.Memory (>= 4.5.4) - restriction: && (< net461) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos) + System.Security.Cryptography.Pkcs (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard2.0)) (>= monotouch) (&& (< net461) (>= netstandard2.0)) (>= netcoreapp2.1) (>= xamarinios) (>= xamarinmac) (>= xamarintvos) (>= xamarinwatchos) System.Security.Permissions (>= 5.0) - restriction: || (>= monoandroid) (>= monotouch) (>= net461) (>= netstandard2.0) (>= xamarintvos) (>= xamarinwatchos) System.Security.Permissions (5.0) - restriction: >= netstandard2.0 System.Security.AccessControl (>= 5.0) - restriction: || (>= net461) (>= netstandard2.0) System.Windows.Extensions (>= 5.0) - restriction: >= netcoreapp3.0 - System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) + System.Security.Principal.Windows (5.0) - restriction: || (&& (>= monoandroid) (< netstandard1.3) (>= netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0)) (&& (>= monotouch) (>= netstandard2.0)) (&& (< net45) (>= net461) (>= netstandard2.0)) (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0)) (>= netcoreapp2.1) (&& (>= netstandard2.0) (>= uap10.1)) (&& (>= netstandard2.0) (>= xamarintvos)) (&& (>= netstandard2.0) (>= xamarinwatchos)) (>= xamarinios) (>= xamarinmac) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (>= netcoreapp2.0) (< netcoreapp2.1)) (&& (>= netcoreapp2.1) (< netcoreapp3.0)) System.Text.Encoding.CodePages (5.0) - restriction: || (&& (< net472) (>= netstandard2.0)) (>= net5.0) Microsoft.NETCore.Platforms (>= 5.0) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net5.0) - System.Text.Encodings.Web (5.0.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netcoreapp2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) + System.Text.Encodings.Web (5.0.1) - restriction: || (&& (>= monoandroid) (>= net5.0) (< netstandard2.0)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= monotouch) (>= net5.0)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinios)) (&& (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (< netcoreapp2.0) (>= xamarinmac)) (&& (>= net5.0) (< netstandard2.0) (>= xamarintvos)) (&& (>= net5.0) (< netstandard2.0) (>= xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) System.Buffers (>= 4.5.1) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) System.Memory (>= 4.5.4) - restriction: || (&& (< net45) (< netcoreapp2.0) (>= netstandard2.0) (< netstandard2.1)) (>= net461) (&& (>= netcoreapp2.0) (< netcoreapp2.1) (< netstandard2.1)) (>= uap10.1) System.Text.Json (5.0.2) - restriction: || (>= net472) (>= net5.0) - Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) - System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) - System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) - System.Numerics.Vectors (>= 4.5) - restriction: || (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) - System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) - System.Text.Encodings.Web (>= 5.0.1) - restriction: || (&& (>= monoandroid) (< netcoreapp2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) - System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (>= uap10.1) + Microsoft.Bcl.AsyncInterfaces (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard2.0)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Buffers (>= 4.5.1) - restriction: || (&& (>= monoandroid) (< netstandard2.0)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) + System.Memory (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) + System.Numerics.Vectors (>= 4.5) - restriction: || (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) + System.Runtime.CompilerServices.Unsafe (>= 5.0) - restriction: || (&& (>= monoandroid) (< netstandard2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Text.Encodings.Web (>= 5.0.1) - restriction: || (&& (>= monoandroid) (< netstandard2.0)) (&& (< monoandroid) (< net5.0) (>= netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= netcoreapp2.1) (< netcoreapp3.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= monotouch) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< netcoreapp2.0) (>= xamarinios)) (&& (< netcoreapp2.0) (>= xamarinmac)) (&& (< netstandard2.0) (>= xamarintvos)) (&& (< netstandard2.0) (>= xamarinwatchos)) (>= uap10.1) + System.Threading.Tasks.Extensions (>= 4.5.4) - restriction: || (&& (< monoandroid) (>= netcoreapp2.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netcoreapp2.0) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= uap10.1) System.ValueTuple (>= 4.5) - restriction: >= net461 System.Threading.Tasks.Dataflow (5.0) - restriction: >= netstandard2.0 - System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (>= uap10.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) - System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) + System.Threading.Tasks.Extensions (4.5.4) - restriction: || (&& (< monoandroid) (>= net5.0) (< netcoreapp2.1) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net461) (>= net5.0)) (>= net472) (&& (>= net5.0) (< netcoreapp2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (&& (>= net5.0) (>= uap10.1)) (&& (< netcoreapp3.1) (>= netstandard2.0)) (&& (>= netstandard2.0) (>= uap10.1)) + System.Runtime.CompilerServices.Unsafe (>= 4.5.3) - restriction: || (&& (< monoandroid) (< monotouch) (< net45) (>= netstandard1.0) (< netstandard2.0) (< win8) (< wpa81) (< xamarintvos) (< xamarinwatchos)) (&& (< monoandroid) (< netstandard1.0) (>= portable-net45+win8+wp8+wpa81) (< win8)) (&& (>= net45) (< netstandard2.0)) (&& (< net45) (< netcoreapp2.1) (>= netstandard2.0) (< xamarinios) (< xamarinmac) (< xamarintvos) (< xamarinwatchos)) (>= net461) (&& (< netstandard1.0) (>= win8)) (&& (< netstandard2.0) (>= wpa81)) (>= wp8) System.ValueTuple (4.5) - restriction: || (&& (>= net45) (>= netstandard2.0)) (&& (>= net461) (>= net5.0)) (>= net472) System.Windows.Extensions (5.0) - restriction: >= netcoreapp3.0 System.Drawing.Common (>= 5.0) - restriction: >= netcoreapp3.0 diff --git a/src/fsdocs-tool/ProjectCracker.fs b/src/fsdocs-tool/ProjectCracker.fs index e1510e0a9..a08d78eed 100644 --- a/src/fsdocs-tool/ProjectCracker.fs +++ b/src/fsdocs-tool/ProjectCracker.fs @@ -2,6 +2,7 @@ namespace fsdocs open System open System.IO +open System.Runtime.InteropServices open System.Runtime.Serialization open System.Xml @@ -13,7 +14,62 @@ open Ionide.ProjInfo.Types [] module Utils = // Needs to be done before anything else?!? - let msbuildExe = Ionide.ProjInfo.Init.init () + //let toolsPath = Ionide.ProjInfo.Init.init (DirectoryInfo(Directory.GetCurrentDirectory())) None + + let isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows) + + let dotnet = if isWindows then "dotnet.exe" else "dotnet" + + let fileExists pathToFile = + try + File.Exists(pathToFile) + with | _ -> false + + // Look for global install of dotnet sdk + let getDotnetGlobalHostPath() = + let pf = Environment.GetEnvironmentVariable("ProgramW6432") + let pf = if String.IsNullOrEmpty(pf) then Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles) else pf + let candidate = Path.Combine(pf, "dotnet", dotnet) + if fileExists candidate then + Some candidate + else + // Can't find it --- give up + None + + // from dotnet/fsharp + let getDotnetHostPath() = + // How to find dotnet.exe --- woe is me; probing rules make me sad. + // Algorithm: + // 1. Look for DOTNET_HOST_PATH environment variable + // this is the main user programable override .. provided by user to find a specific dotnet.exe + // 2. Probe for are we part of an .NetSDK install + // In an sdk install we are always installed in: sdk\3.0.100-rc2-014234\FSharp + // dotnet or dotnet.exe will be found in the directory that contains the sdk directory + // 3. We are loaded in-process to some other application ... Eg. try .net + // See if the host is dotnet.exe ... from net5.0 on this is fairly unlikely + // 4. If it's none of the above we are going to have to rely on the path containing the way to find dotnet.exe + // Use the path to search for dotnet.exe + let probePathForDotnetHost() = + let paths = + let p = Environment.GetEnvironmentVariable("PATH") + if not(isNull p) then p.Split(Path.PathSeparator) + else [||] + paths |> Array.tryFind (fun f -> fileExists (Path.Combine(f, dotnet))) + + match (Environment.GetEnvironmentVariable("DOTNET_HOST_PATH")) with + // Value set externally + | value when not (String.IsNullOrEmpty(value)) && fileExists value -> Some value + | _ -> + // Probe for netsdk install, dotnet. and dotnet.exe is a constant offset from the location of System.Int32 + let candidate = + let assemblyLocation = Path.GetDirectoryName(typeof.Assembly.Location) + Path.GetFullPath(Path.Combine(assemblyLocation, "..", "..", "..", dotnet)) + if fileExists candidate then + Some candidate + else + match probePathForDotnetHost () with + | Some f -> Some (Path.Combine(f, dotnet)) + | None -> getDotnetGlobalHostPath() let ensureDirectory path = let dir = DirectoryInfo(path) @@ -154,7 +210,7 @@ module Crack = //PackageReleaseNotes : string option RepositoryCommit: string option } - let private crackProjectFileAndIncludeTargetFrameworks _slnDir extraMsbuildProperties (file: string) = + let private crackProjectFileAndIncludeTargetFrameworks _slnDir extraMsbuildProperties (projectFile: string) = let additionalInfo = [ "OutputType" "IsTestProject" @@ -189,13 +245,30 @@ module Crack = "TargetFrameworks" "RunArguments" ] - let gp = ("TargetPath" :: additionalInfo) + let customProperties = ("TargetPath" :: additionalInfo) let loggedMessages = System.Collections.Concurrent.ConcurrentQueue() - - let result = ProjectLoader.getProjectInfo file msbuildExe extraMsbuildProperties false gp - //file |> Inspect.getProjectInfos loggedMessages.Enqueue msbuildExec [gp] [] + let parseProject (path: string) = + try + let dotnetExe = getDotnetHostPath() + let cwd = Path.GetDirectoryName path |> System.IO.DirectoryInfo + let toolsPath = Ionide.ProjInfo.Init.init cwd (dotnetExe |> Option.map FileInfo) + let tfm = ProjectLoader.getTfm path (dict extraMsbuildProperties) + let readingProps = + Ionide.ProjInfo.ProjectLoader.getGlobalProps path tfm extraMsbuildProperties + |> Seq.toList + |> List.map (fun (KeyValue(k,v)) -> (k,v)) + let loader = WorkspaceLoader.Create(toolsPath, readingProps) + loader.LoadProjects([ path ], customProperties, BinaryLogGeneration.Within cwd) + |> Seq.tryHead + |> function + | None -> Error (Exception $"no result returned for loading {path}") + | Some p -> Ok p + with err -> Error err + + let result = parseProject projectFile // ProjectLoader.getProjectInfo file extraMsbuildProperties BinaryLogGeneration.Off customProperties + //file |> Inspect.getProjectInfos loggedMessages.Enqueue toolsPath [gp] [] let msgs = (loggedMessages.ToArray() |> Array.toList) @@ -229,7 +302,7 @@ module Crack = let projOptions2 = - { ProjectFileName = file + { ProjectFileName = projectFile ProjectOptions = Some projOptions TargetPath = msbuildPropString "TargetPath" IsTestProject = msbuildPropBool "IsTestProject" |> Option.defaultValue false diff --git a/src/fsdocs-tool/fsdocs-tool.fsproj b/src/fsdocs-tool/fsdocs-tool.fsproj index 1e6b284be..53ae4d599 100644 --- a/src/fsdocs-tool/fsdocs-tool.fsproj +++ b/src/fsdocs-tool/fsdocs-tool.fsproj @@ -3,7 +3,7 @@ Exe fsdocs - net5.0 + net5.0;net6.0 fsdocs-tool LatestMajor true @@ -11,7 +11,6 @@ true true - @@ -22,7 +21,6 @@ - @@ -33,7 +31,6 @@ - @@ -41,6 +38,15 @@ + + + + + + + + + \ No newline at end of file From 62e177c2243fd837a587e70db18400f476c2daaf Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sun, 7 Nov 2021 00:27:39 +0000 Subject: [PATCH 9/9] integrate --- .../files/_template.html | 83 ------------------- 1 file changed, 83 deletions(-) delete mode 100644 tests/FSharp.Literate.Tests/files/_template.html diff --git a/tests/FSharp.Literate.Tests/files/_template.html b/tests/FSharp.Literate.Tests/files/_template.html deleted file mode 100644 index 01e1c3bcd..000000000 --- a/tests/FSharp.Literate.Tests/files/_template.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - {{fsdocs-page-title}} - - - - - - - - - - - - - - - - - - - - {{fsdocs-watch-script}} - - - - -
- -
-
- {{fsdocs-content}} - {{fsdocs-tooltips}} -
- - - - - - - - -
- - - -