From a398d2e23d3d1a31b8eed55e4d29001255a80731 Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Wed, 27 Apr 2016 00:58:11 +0800 Subject: [PATCH 1/3] downgraded to the target netstandard1.1 to support more platforms --- MarkdownDeep/BlockProcessor.cs | 11 +++++++++-- MarkdownDeep/StringScanner.cs | 4 ++++ MarkdownDeep/project.json | 27 ++++++++++----------------- 3 files changed, 23 insertions(+), 19 deletions(-) diff --git a/MarkdownDeep/BlockProcessor.cs b/MarkdownDeep/BlockProcessor.cs index 8fb90a7..57714c4 100644 --- a/MarkdownDeep/BlockProcessor.cs +++ b/MarkdownDeep/BlockProcessor.cs @@ -1080,7 +1080,14 @@ internal bool ScanHtml(Block b) } // Head block extraction? - bool bHeadBlock = m_markdown.ExtractHeadBlocks && string.Compare(openingTag.name, "head", true) == 0; + +#if DOTNET_CORE + var isOpenTagHead = string.Compare(openingTag.name, "head", StringComparison.OrdinalIgnoreCase) == 0; +#else + var isOpenTagHead = string.Compare(openingTag.name, "head", true) == 0; +#endif + + bool bHeadBlock = m_markdown.ExtractHeadBlocks && isOpenTagHead; int headStart = this.position; // Work out the markdown mode for this element @@ -1481,7 +1488,7 @@ private Block BuildFootnote(List lines) } bool ProcessFencedCodeBlock(Block b) - { + { char delim = current; // Extract the fence diff --git a/MarkdownDeep/StringScanner.cs b/MarkdownDeep/StringScanner.cs index 8727088..fc0641d 100644 --- a/MarkdownDeep/StringScanner.cs +++ b/MarkdownDeep/StringScanner.cs @@ -314,7 +314,11 @@ public bool DoesMatch(string str) // Does current string position match a string public bool DoesMatchI(string str) { +#if DOTNET_CORE + return string.Compare(str, Substring(position, str.Length), StringComparison.OrdinalIgnoreCase) == 0; +#else return string.Compare(str, Substring(position, str.Length), true) == 0; +#endif } // Extract a substring diff --git a/MarkdownDeep/project.json b/MarkdownDeep/project.json index 557e190..9e1d403 100755 --- a/MarkdownDeep/project.json +++ b/MarkdownDeep/project.json @@ -4,25 +4,18 @@ "emitEntryPoint": false }, - "configurations": { - "Debug": { - "compilationOptions": { - "define": ["DEBUG", "TRACE", "DOTNET_CORE"] - } - }, - "Release": { + "frameworks": { + "netstandard1.1": { "compilationOptions": { - "define": ["RELEASE", "TRACE", "DOTNET_CORE"], - "optimize": true + "define": [ "DOTNET_CORE" ] + }, + "dependencies": { + "System.Diagnostics.Debug": "4.0.11-rc3-*", + "System.Linq": "4.1.0-rc3-*", + "System.Runtime.Extensions": "4.1.0-rc3-*", + "System.Runtime.InteropServices": "4.1.0-rc3-*", + "System.Text.RegularExpressions": "4.1.0-rc3-*" } } - }, - - "dependencies": { - "Microsoft.NETCore.App": "1.0.0-rc2-*" - }, - - "frameworks": { - "dnxcore50": { } } } From 14544d01ebdb0d1e554ac59051e12ad0f35e19ea Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Sat, 21 May 2016 12:40:43 +0800 Subject: [PATCH 2/3] adjusted the project file for .net core rc2 release --- MarkdownDeep/NuGet.Config | 9 --------- MarkdownDeep/project.json | 15 ++++++++------- 2 files changed, 8 insertions(+), 16 deletions(-) delete mode 100755 MarkdownDeep/NuGet.Config diff --git a/MarkdownDeep/NuGet.Config b/MarkdownDeep/NuGet.Config deleted file mode 100755 index e80222c..0000000 --- a/MarkdownDeep/NuGet.Config +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/MarkdownDeep/project.json b/MarkdownDeep/project.json index 9e1d403..f5878c4 100755 --- a/MarkdownDeep/project.json +++ b/MarkdownDeep/project.json @@ -1,20 +1,21 @@ { + "name": "MarkdownDeep", "version": "1.0.0-*", - "compilationOptions": { + "buildOptions": { "emitEntryPoint": false }, "frameworks": { "netstandard1.1": { - "compilationOptions": { + "buildOptions": { "define": [ "DOTNET_CORE" ] }, "dependencies": { - "System.Diagnostics.Debug": "4.0.11-rc3-*", - "System.Linq": "4.1.0-rc3-*", - "System.Runtime.Extensions": "4.1.0-rc3-*", - "System.Runtime.InteropServices": "4.1.0-rc3-*", - "System.Text.RegularExpressions": "4.1.0-rc3-*" + "System.Diagnostics.Debug": "4.0.11-rc2-*", + "System.Linq": "4.1.0-rc2-*", + "System.Runtime.Extensions": "4.1.0-rc2-*", + "System.Runtime.InteropServices": "4.1.0-rc2-*", + "System.Text.RegularExpressions": "4.0.12-rc2-*" } } } From ab211f9df11b83a3ce0811005649abe01f4ff6b6 Mon Sep 17 00:00:00 2001 From: Kerry Jiang Date: Fri, 1 Jul 2016 23:17:12 +0800 Subject: [PATCH 3/3] upgraded to .net core 1.0 --- MarkdownDeep/project.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/MarkdownDeep/project.json b/MarkdownDeep/project.json index f5878c4..1b04537 100755 --- a/MarkdownDeep/project.json +++ b/MarkdownDeep/project.json @@ -11,11 +11,11 @@ "define": [ "DOTNET_CORE" ] }, "dependencies": { - "System.Diagnostics.Debug": "4.0.11-rc2-*", - "System.Linq": "4.1.0-rc2-*", - "System.Runtime.Extensions": "4.1.0-rc2-*", - "System.Runtime.InteropServices": "4.1.0-rc2-*", - "System.Text.RegularExpressions": "4.0.12-rc2-*" + "System.Diagnostics.Debug": "4.0.11", + "System.Linq": "4.1.0", + "System.Runtime.Extensions": "4.1.0", + "System.Runtime.InteropServices": "4.1.0", + "System.Text.RegularExpressions": "4.1.0" } } }