Normalise Line endings (#1284)

* Add .gitattributes

* Normalise line endings
This commit is contained in:
flightlevel
2017-04-15 18:45:10 +10:00
committed by GitHub
parent ed601a0f7d
commit f2def1f615
211 changed files with 29715 additions and 29700 deletions

View File

@@ -1,10 +1,10 @@
using AngleSharp.Dom;
using AngleSharp.Html;
using AngleSharp.Dom;
using AngleSharp.Html;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Globalization;
using System.IO;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Net.Http;
using System.Security.Cryptography;
@@ -30,19 +30,19 @@ namespace Jackett.Utils
}
// replaces culture specific characters with the corresponding base characters (e.g. è becomes e).
public static String RemoveDiacritics(String s)
{
String normalizedString = s.Normalize(NormalizationForm.FormD);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < normalizedString.Length; i++)
{
Char c = normalizedString[i];
if (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)
stringBuilder.Append(c);
}
return stringBuilder.ToString();
public static String RemoveDiacritics(String s)
{
String normalizedString = s.Normalize(NormalizationForm.FormD);
StringBuilder stringBuilder = new StringBuilder();
for (int i = 0; i < normalizedString.Length; i++)
{
Char c = normalizedString[i];
if (CharUnicodeInfo.GetUnicodeCategory(c) != UnicodeCategory.NonSpacingMark)
stringBuilder.Append(c);
}
return stringBuilder.ToString();
}
public static string FromBase64(string str)
@@ -104,7 +104,7 @@ namespace Jackett.Utils
}
public static void Add(this ICollection<KeyValuePair<string, string>> collection, string key, string value)
{
{
collection.Add(new KeyValuePair<string, string>(key, value));
}
@@ -113,11 +113,11 @@ namespace Jackett.Utils
if (element == null)
return "<NULL>";
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
var formatter = new PrettyMarkupFormatter();
StringBuilder sb = new StringBuilder();
StringWriter sw = new StringWriter(sb);
var formatter = new PrettyMarkupFormatter();
element.ToHtml(sw, formatter);
return sb.ToString();
return sb.ToString();
}