Code view:

A painting is a person's account of this edit as text, recorded independently of the node mapping - a rendering often has several equally defensible answers where the mapping has one. Deletions and insertions carry no position on the opposite side in a painting, so that panel draws no caret for them.

Before

…lines 1–513 unchanged (513 lines)
514 new Regex(@"^(Season[ ._-]*\d+|Specials)$", RegexOptions.Compiled)
515 };
516
517 // Regex to detect whether the title was reversed.
518 private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801|\d{2,3}E\d{2}S)[-._ ]", RegexOptions.Compiled);
519
520 private static readonly RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?<!^)(a(?!$)|an|the|and|or|of)(?!$)(?:\b|_))|\W|_",
521 string.Empty,
522 RegexOptions.IgnoreCase | RegexOptions.Compiled);
523
524 private static readonly Regex PercentRegex = new Regex(@"(?<=\b\d+)%", RegexOptions.Compiled);
525
526 private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
…lines 527–841 unchanged (315 lines)
842 return title;
843 }
844
845 // Replace `%` with `percent` to deal with the 3% case
846 title = PercentRegex.Replace(title, "percent");
847
848 return NormalizeRegex.Replace(title).ToLower().RemoveAccent();
849 }
850
851 public static string NormalizeEpisodeTitle(string title)
852 {
853 var match = SpecialEpisodeTitleRegex
854 .Select(v => v.Match(title))
…lines 855–1366 unchanged (512 lines)

After

…lines 1–513 unchanged (513 lines)
514 new Regex(@"^(Season[ ._-]*\d+|Specials)$", RegexOptions.Compiled)
515 };
516
517 // Regex to detect whether the title was reversed.
518 private static readonly Regex ReversedTitleRegex = new Regex(@"(?:^|[-._ ])(p027|p0801|\d{2,3}E\d{2}S)[-._ ]", RegexOptions.Compiled);
519
520 private static readonly RegexReplace NormalizeRegex = new RegexReplace(@"((?:\b|_)(?<!^)([aà](?!$)|an|the|and|or|of)(?!$)(?:\b|_))|\W|_",
521 string.Empty,
522 RegexOptions.IgnoreCase | RegexOptions.Compiled);
523
524 private static readonly Regex PercentRegex = new Regex(@"(?<=\b\d+)%", RegexOptions.Compiled);
525
526 private static readonly Regex FileExtensionRegex = new Regex(@"\.[a-z0-9]{2,4}$",
…lines 527–841 unchanged (315 lines)
842 return title;
843 }
844
845 // Replace `%` with `percent` to deal with the 3% case
846 title = PercentRegex.Replace(title, "percent");
847
848 return NormalizeRegex.Replace(title).ToLowerInvariant().RemoveAccent();
849 }
850
851 public static string NormalizeEpisodeTitle(string title)
852 {
853 var match = SpecialEpisodeTitleRegex
854 .Select(v => v.Match(title))
…lines 855–1366 unchanged (512 lines)

Before

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Text"
. "."
identifier "RegularExpressions"
; ";"
using_directive
using "using"
identifier "NLog"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Common"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Common"
. "."
identifier "Instrumentation"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
. "."
identifier "Model"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Tv"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
declaration_list
{ "{"
class_declaration
modifier
public "public"
modifier
static "static"
class "class"
identifier "Parser"
declaration_list
{ "{"
field_declaration (+27 nodes collapsed)
field_declaration (+266 nodes collapsed)
field_declaration (+2187 nodes collapsed)
field_declaration (+68 nodes collapsed)
field_declaration (+263 nodes collapsed)
field_declaration (+41 nodes collapsed)
comment "// Regex to detect whether the title was reversed."
field_declaration (+27 nodes collapsed)
field_declaration
modifier
private "private"
modifier
static "static"
modifier
readonly "readonly"
variable_declaration
identifier "RegexReplace"
variable_declarator
identifier "NormalizeRegex"
= "="
object_creation_expression
new "new"
identifier "RegexReplace"
argument_list
( "("
argument
verbatim_string_literal "@\"((?:\\b|_)(?<!^)(a(?!$)|an|the|and|or|of)(?!$)(?:\\b|_))|\\W|"...
, ","
argument
member_access_expression
predefined_type "string"
. "."
identifier "Empty"
, ","
argument
binary_expression
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnoreCase"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "Compiled"
) ")"
; ";"
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+39 nodes collapsed)
comment "// Valid TLDs http://data.iana.org/TLD/tlds-alpha-by-domain."...
field_declaration (+39 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
comment "// Handle Exception Release Groups that don't follow -RlsGrp"...
comment "// name only...be very careful with this last; high chance o"...
field_declaration (+33 nodes collapsed)
comment "// groups whose releases end with RlsGroup) or RlsGroup]"
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+73 nodes collapsed)
field_declaration (+32 nodes collapsed)
method_declaration (+733 nodes collapsed)
method_declaration (+218 nodes collapsed)
method_declaration (+1119 nodes collapsed)
method_declaration (+77 nodes collapsed)
method_declaration
modifier
public "public"
modifier
static "static"
predefined_type "string"
identifier "CleanSeriesTitle"
parameter_list
( "("
parameter
modifier "this"
predefined_type "string"
identifier "title"
) ")"
block
{ "{"
comment "// If Title only contains numbers return it as is."
if_statement (+25 nodes collapsed)
comment "// Replace `%` with `percent` to deal with the 3% case"
expression_statement (+21 nodes collapsed)
return_statement
return "return"
invocation_expression
member_access_expression
invocation_expression
member_access_expression
invocation_expression
member_access_expression
identifier "NormalizeRegex"
. "."
identifier "Replace"
argument_list
( "("
argument
identifier "title"
) ")"
. "."
identifier "ToLower"
argument_list
( "("
) ")"
. "."
identifier "RemoveAccent"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+175 nodes collapsed)
method_declaration (+97 nodes collapsed)
method_declaration (+123 nodes collapsed)
method_declaration (+440 nodes collapsed)
method_declaration (+126 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+362 nodes collapsed)
method_declaration (+2206 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+68 nodes collapsed)
method_declaration (+134 nodes collapsed)
method_declaration (+139 nodes collapsed)
method_declaration (+109 nodes collapsed)
method_declaration (+119 nodes collapsed)
} "}"
} "}"

After

compilation_unit
using_directive
using "using"
identifier "System"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Collections"
. "."
identifier "Generic"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Globalization"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Text"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "System"
. "."
identifier "Text"
. "."
identifier "RegularExpressions"
; ";"
using_directive
using "using"
identifier "NLog"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Common"
. "."
identifier "Extensions"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Common"
. "."
identifier "Instrumentation"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
. "."
identifier "Model"
; ";"
using_directive
using "using"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Tv"
; ";"
namespace_declaration
namespace "namespace"
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
declaration_list
{ "{"
class_declaration
modifier
public "public"
modifier
static "static"
class "class"
identifier "Parser"
declaration_list
{ "{"
field_declaration (+27 nodes collapsed)
field_declaration (+266 nodes collapsed)
field_declaration (+2187 nodes collapsed)
field_declaration (+68 nodes collapsed)
field_declaration (+263 nodes collapsed)
field_declaration (+41 nodes collapsed)
comment "// Regex to detect whether the title was reversed."
field_declaration (+27 nodes collapsed)
field_declaration
modifier
private "private"
modifier
static "static"
modifier
readonly "readonly"
variable_declaration
identifier "RegexReplace"
variable_declarator
identifier "NormalizeRegex"
= "="
object_creation_expression
new "new"
identifier "RegexReplace"
argument_list
( "("
argument
verbatim_string_literal "@\"((?:\\b|_)(?<!^)([aà](?!$)|an|the|and|or|of)(?!$)(?:\\b|_))|"...
, ","
argument
member_access_expression
predefined_type "string"
. "."
identifier "Empty"
, ","
argument
binary_expression
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnoreCase"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "Compiled"
) ")"
; ";"
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+39 nodes collapsed)
comment "// Valid TLDs http://data.iana.org/TLD/tlds-alpha-by-domain."...
field_declaration (+39 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+39 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
comment "// Handle Exception Release Groups that don't follow -RlsGrp"...
comment "// name only...be very careful with this last; high chance o"...
field_declaration (+33 nodes collapsed)
comment "// groups whose releases end with RlsGroup) or RlsGroup]"
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
field_declaration (+73 nodes collapsed)
field_declaration (+32 nodes collapsed)
method_declaration (+733 nodes collapsed)
method_declaration (+218 nodes collapsed)
method_declaration (+1119 nodes collapsed)
method_declaration (+77 nodes collapsed)
method_declaration
modifier
public "public"
modifier
static "static"
predefined_type "string"
identifier "CleanSeriesTitle"
parameter_list
( "("
parameter
modifier "this"
predefined_type "string"
identifier "title"
) ")"
block
{ "{"
comment "// If Title only contains numbers return it as is."
if_statement (+25 nodes collapsed)
comment "// Replace `%` with `percent` to deal with the 3% case"
expression_statement (+21 nodes collapsed)
return_statement
return "return"
invocation_expression
member_access_expression
invocation_expression
member_access_expression
invocation_expression
member_access_expression
identifier "NormalizeRegex"
. "."
identifier "Replace"
argument_list
( "("
argument
identifier "title"
) ")"
. "."
identifier "ToLowerInvariant"
argument_list
( "("
) ")"
. "."
identifier "RemoveAccent"
argument_list
( "("
) ")"
; ";"
} "}"
method_declaration (+175 nodes collapsed)
method_declaration (+97 nodes collapsed)
method_declaration (+123 nodes collapsed)
method_declaration (+440 nodes collapsed)
method_declaration (+126 nodes collapsed)
method_declaration (+29 nodes collapsed)
method_declaration (+362 nodes collapsed)
method_declaration (+2206 nodes collapsed)
method_declaration (+235 nodes collapsed)
method_declaration (+68 nodes collapsed)
method_declaration (+134 nodes collapsed)
method_declaration (+139 nodes collapsed)
method_declaration (+109 nodes collapsed)
method_declaration (+119 nodes collapsed)
} "}"
} "}"