mirror of
https://github.com/xoofx/markdig.git
synced 2026-11-18 02:11:20 +00:00
Merge pull request #593 from tibel/define-NETCORE-removed
remove NETCORE constant
This commit is contained in:
@@ -19,8 +19,6 @@ using System.Runtime.CompilerServices;
|
||||
* Please note the lack of a Remove method on this data structure
|
||||
*/
|
||||
|
||||
// Relies on NETCORE being set for selective use of Spans
|
||||
|
||||
//namespace SharpCollections.Generic
|
||||
namespace Markdig.Helpers
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ namespace Markdig.Helpers
|
||||
|
||||
utf32 -= 65536;
|
||||
return new string(
|
||||
#if NETCORE
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
stackalloc
|
||||
#else
|
||||
new
|
||||
|
||||
@@ -34,18 +34,6 @@
|
||||
<ItemGroup Condition=" '$(TargetFramework)' == 'netstandard2.0' ">
|
||||
<PackageReference Include="System.Memory" Version="4.5.4" />
|
||||
</ItemGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netstandard2.1' ">
|
||||
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'netcoreapp3.1' ">
|
||||
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition=" '$(TargetFramework)' == 'net6.0' ">
|
||||
<DefineConstants>$(DefineConstants);NETCORE</DefineConstants>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="../../img/markdig.png" Pack="true" PackagePath="" />
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
namespace System.Diagnostics.CodeAnalysis
|
||||
{
|
||||
#if !NETCORE
|
||||
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
|
||||
internal sealed class DoesNotReturnAttribute : Attribute { }
|
||||
|
||||
[AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
|
||||
|
||||
@@ -102,7 +102,7 @@ namespace Markdig.Renderers
|
||||
}
|
||||
|
||||
protected bool previousWasLine;
|
||||
#if !NETCORE
|
||||
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
|
||||
private char[] buffer;
|
||||
#endif
|
||||
private readonly List<Indent> indents;
|
||||
@@ -113,7 +113,7 @@ namespace Markdig.Renderers
|
||||
/// <param name="writer">The writer.</param>
|
||||
protected TextRendererBase(TextWriter writer) : base(writer)
|
||||
{
|
||||
#if !NETCORE
|
||||
#if !NETSTANDARD2_1_OR_GREATER && !NETCOREAPP3_1_OR_GREATER
|
||||
buffer = new char[1024];
|
||||
#endif
|
||||
// We assume that we are starting as if we had previously a newline
|
||||
@@ -263,7 +263,7 @@ namespace Markdig.Renderers
|
||||
WriteIndent();
|
||||
previousWasLine = false;
|
||||
|
||||
#if NETCORE
|
||||
#if NETSTANDARD2_1_OR_GREATER || NETCOREAPP3_1_OR_GREATER
|
||||
Writer.Write(content.AsSpan(offset, length));
|
||||
#else
|
||||
if (offset == 0 && content.Length == length)
|
||||
|
||||
Reference in New Issue
Block a user