Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

upgrade .net core support to 1.0 #76

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 9 additions & 2 deletions MarkdownDeep/BlockProcessor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -1481,7 +1488,7 @@ private Block BuildFootnote(List<Block> lines)
}

bool ProcessFencedCodeBlock(Block b)
{
{
char delim = current;

// Extract the fence
Expand Down
9 changes: 0 additions & 9 deletions MarkdownDeep/NuGet.Config

This file was deleted.

4 changes: 4 additions & 0 deletions MarkdownDeep/StringScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 13 additions & 19 deletions MarkdownDeep/project.json
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
{
"name": "MarkdownDeep",
"version": "1.0.0-*",
"compilationOptions": {
"buildOptions": {
"emitEntryPoint": false
},

"configurations": {
"Debug": {
"compilationOptions": {
"define": ["DEBUG", "TRACE", "DOTNET_CORE"]
}
},
"Release": {
"compilationOptions": {
"define": ["RELEASE", "TRACE", "DOTNET_CORE"],
"optimize": true
"frameworks": {
"netstandard1.1": {
"buildOptions": {
"define": [ "DOTNET_CORE" ]
},
"dependencies": {
"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"
}
}
},

"dependencies": {
"Microsoft.NETCore.App": "1.0.0-rc2-*"
},

"frameworks": {
"dnxcore50": { }
}
}