Skip to content

Commit

Permalink
added the .net core support (#72)
Browse files Browse the repository at this point in the history
* added *.lock.json to ignore list

* spport dotnet core

* support dotnet core

* replace NETStandard.Library with Microsoft.NETCore.App to align latest .net cli
  • Loading branch information
kerryjiang authored and toptensoftware committed Apr 25, 2016
1 parent 37cd165 commit 76577d2
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ Debug
*.minime-options
*.zip
*.nupkg
/packages/*
*.lock.json
/packages/*
5 changes: 5 additions & 0 deletions MarkdownDeep/MardownDeep.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,6 +401,10 @@ public virtual bool OnGetImageSize(string url, bool TitledImage, out int width,

width = 0;
height = 0;

#if DOTNET_CORE
return false;
#else

if (Utils.IsUrlFullyQualified(url))
return false;
Expand Down Expand Up @@ -445,6 +449,7 @@ public virtual bool OnGetImageSize(string url, bool TitledImage, out int width,
{
return false;
}
#endif
}


Expand Down
9 changes: 9 additions & 0 deletions MarkdownDeep/NuGet.Config
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
<!--To inherit the global NuGet package sources remove the <clear/> line below -->
<clear />
<add key="dotnet-core" value="https://dotnet.myget.org/F/dotnet-core/api/v3/index.json" />
<add key="api.nuget.org" value="https://api.nuget.org/v3/index.json" />
</packageSources>
</configuration>
5 changes: 5 additions & 0 deletions MarkdownDeep/StringScanner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,12 @@ public bool FindI(string find)
if (pos >= end)
return false;

#if DOTNET_CORE
int index = str.IndexOf(find, pos, StringComparison.OrdinalIgnoreCase);
#else
int index = str.IndexOf(find, pos, StringComparison.InvariantCultureIgnoreCase);
#endif

if (index < 0 || index >= end - find.Length)
return false;

Expand Down
28 changes: 28 additions & 0 deletions MarkdownDeep/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"version": "1.0.0-*",
"compilationOptions": {
"emitEntryPoint": false
},

"configurations": {
"Debug": {
"compilationOptions": {
"define": ["DEBUG", "TRACE", "DOTNET_CORE"]
}
},
"Release": {
"compilationOptions": {
"define": ["RELEASE", "TRACE", "DOTNET_CORE"],
"optimize": true
}
}
},

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

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

0 comments on commit 76577d2

Please sign in to comment.