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–11 unchanged (11 lines)
12namespace NzbDrone.Core.Parser
13{
14 public static class LanguageParser
15 {
16 private static readonly Logger Logger = NzbDroneLogger.GetLogger(typeof(LanguageParser));
17
18 private static readonly Regex LanguageRegex = new Regex(@"(?:\W|_|^)(?<english>\beng\b)|
19 (?<italian>\b(?:ita|italian)\b)|
20 (?<german>(?:swiss)?german\b|videomann|ger[. ]dub|\bger\b)|
21 (?<flemish>flemish)|
22 (?<bulgarian>bgaudio)|
23 (?<romanian>rodubbed)|
24 (?<brazilian>\b(dublado|pt-BR)\b)|
…lines 25–433 unchanged (409 lines)
434 }
435
436 if (match.Groups["mongolian"].Success)
437 {
438 languages.Add(Language.Mongolian);
439 }
440
441 if (match.Groups["original"].Success)
442 {
443 languages.Add(Language.Original);
444 }
445 }
446
…lines 447–591 unchanged (145 lines)

After

…lines 1–36 unchanged (36 lines)
37 (?<vietnamese>\bVIE\b)|
38 (?<japanese>\bJAP\b)|
39 (?<korean>\bKOR\b)|
40 (?<urdu>\burdu\b)|
41 (?<romansh>\b(?:romansh|rumantsch|romansch)\b)|
42 (?<mongolian>\b(?:mongolian|khalkha)\b)|
43 (?<georgian>\b(?:georgian|geo|ka|kat)\b)|
44 (?<original>\b(?:orig|original)\b)",
45 RegexOptions.IgnoreCase | RegexOptions.Compiled | RegexOptions.IgnorePatternWhitespace);
46
47 private static readonly Regex CaseSensitiveLanguageRegex = new Regex(@"(?:(?i)(?<!SUB[\W|_|^]))(?:(?<english>\bEN\b)|
48 (?<lithuanian>\bLT\b)|
49 (?<czech>\bCZ\b)|
50 (?<polish>\bPL\b)|
…lines 51–435 unchanged (385 lines)
436
437 if (match.Groups["mongolian"].Success)
438 {
439 languages.Add(Language.Mongolian);
440 }
441
442 if (match.Groups["georgian"].Success)
443 {
444 languages.Add(Language.Georgian);
445 }
446
447 if (match.Groups["original"].Success)
448 {
449 languages.Add(Language.Original);
450 }
451 }
…lines 452–597 unchanged (146 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 "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
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
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Languages"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
. "."
identifier "Model"
; ";"
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 "LanguageParser"
declaration_list
{ "{"
field_declaration (+27 nodes collapsed)
field_declaration
modifier
private "private"
modifier
static "static"
modifier
readonly "readonly"
variable_declaration
identifier "Regex"
variable_declarator
identifier "LanguageRegex"
= "="
object_creation_expression
new "new"
identifier "Regex"
argument_list
( "("
argument
verbatim_string_literal "@\"(?:\\W|_|^)(?<english>\\beng\\b)|\n "...
, ","
argument
binary_expression
binary_expression
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnoreCase"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "Compiled"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnorePatternWhitespace"
) ")"
; ";"
field_declaration (+33 nodes collapsed)
field_declaration (+32 nodes collapsed)
field_declaration (+32 nodes collapsed)
field_declaration (+36 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
method_declaration
modifier
public "public"
modifier
static "static"
generic_name
identifier "List"
type_argument_list
< "<"
identifier "Language"
> ">"
identifier "ParseLanguages"
parameter_list
( "("
parameter
predefined_type "string"
identifier "title"
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "lowerTitle"
= "="
invocation_expression
member_access_expression
identifier "title"
. "."
identifier "ToLower"
argument_list
( "("
) ")"
; ";"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "languages"
= "="
object_creation_expression
new "new"
generic_name
identifier "List"
type_argument_list
< "<"
identifier "Language"
> ">"
argument_list
( "("
) ")"
; ";"
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+65 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
comment "// Case-sensitive"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "caseSensitiveMatches"
= "="
invocation_expression
member_access_expression
identifier "CaseSensitiveLanguageRegex"
. "."
identifier "Matches"
argument_list
( "("
argument
identifier "title"
) ")"
; ";"
foreach_statement (+371 nodes collapsed)
comment "// Case-insensitive"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "matches"
= "="
invocation_expression
member_access_expression
identifier "LanguageRegex"
. "."
identifier "Matches"
argument_list
( "("
argument
identifier "title"
) ")"
; ";"
foreach_statement
foreach "foreach"
( "("
identifier "Match"
identifier "match"
in "in"
identifier "matches"
) ")"
block
{ "{"
if_statement (+38 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
} "}"
if_statement (+32 nodes collapsed)
if_statement (+140 nodes collapsed)
return_statement (+27 nodes collapsed)
} "}"
method_declaration (+188 nodes collapsed)
method_declaration (+255 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+415 nodes collapsed)
method_declaration (+192 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 "IO"
; ";"
using_directive
using "using"
qualified_name
identifier "System"
. "."
identifier "Linq"
; ";"
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
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Languages"
; ";"
using_directive
using "using"
qualified_name
qualified_name
qualified_name
identifier "NzbDrone"
. "."
identifier "Core"
. "."
identifier "Parser"
. "."
identifier "Model"
; ";"
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 "LanguageParser"
declaration_list
{ "{"
field_declaration (+27 nodes collapsed)
field_declaration
modifier
private "private"
modifier
static "static"
modifier
readonly "readonly"
variable_declaration
identifier "Regex"
variable_declarator
identifier "LanguageRegex"
= "="
object_creation_expression
new "new"
identifier "Regex"
argument_list
( "("
argument
verbatim_string_literal "@\"(?:\\W|_|^)(?<english>\\beng\\b)|\n "...
, ","
argument
binary_expression
binary_expression
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnoreCase"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "Compiled"
| "|"
member_access_expression
identifier "RegexOptions"
. "."
identifier "IgnorePatternWhitespace"
) ")"
; ";"
field_declaration (+33 nodes collapsed)
field_declaration (+32 nodes collapsed)
field_declaration (+32 nodes collapsed)
field_declaration (+36 nodes collapsed)
field_declaration (+33 nodes collapsed)
field_declaration (+27 nodes collapsed)
method_declaration
modifier
public "public"
modifier
static "static"
generic_name
identifier "List"
type_argument_list
< "<"
identifier "Language"
> ">"
identifier "ParseLanguages"
parameter_list
( "("
parameter
predefined_type "string"
identifier "title"
) ")"
block
{ "{"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "lowerTitle"
= "="
invocation_expression
member_access_expression
identifier "title"
. "."
identifier "ToLower"
argument_list
( "("
) ")"
; ";"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "languages"
= "="
object_creation_expression
new "new"
generic_name
identifier "List"
type_argument_list
< "<"
identifier "Language"
> ">"
argument_list
( "("
) ")"
; ";"
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+65 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
if_statement (+35 nodes collapsed)
comment "// Case-sensitive"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "caseSensitiveMatches"
= "="
invocation_expression
member_access_expression
identifier "CaseSensitiveLanguageRegex"
. "."
identifier "Matches"
argument_list
( "("
argument
identifier "title"
) ")"
; ";"
foreach_statement (+371 nodes collapsed)
comment "// Case-insensitive"
local_declaration_statement
variable_declaration
implicit_type
var "var"
variable_declarator
identifier "matches"
= "="
invocation_expression
member_access_expression
identifier "LanguageRegex"
. "."
identifier "Matches"
argument_list
( "("
argument
identifier "title"
) ")"
; ";"
foreach_statement
foreach "foreach"
( "("
identifier "Match"
identifier "match"
in "in"
identifier "matches"
) ")"
block
{ "{"
if_statement (+38 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+45 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement (+38 nodes collapsed)
if_statement
if "if"
( "("
member_access_expression
element_access_expression
member_access_expression
identifier "match"
. "."
identifier "Groups"
bracketed_argument_list
[ "["
argument
string_literal
" "\""
string_literal_content "georgian"
" "\""
] "]"
. "."
identifier "Success"
) ")"
block
{ "{"
expression_statement
invocation_expression
member_access_expression
identifier "languages"
. "."
identifier "Add"
argument_list
( "("
argument
member_access_expression
identifier "Language"
. "."
identifier "Georgian"
) ")"
; ";"
} "}"
if_statement (+38 nodes collapsed)
} "}"
if_statement (+32 nodes collapsed)
if_statement (+140 nodes collapsed)
return_statement (+27 nodes collapsed)
} "}"
method_declaration (+188 nodes collapsed)
method_declaration (+255 nodes collapsed)
method_declaration (+52 nodes collapsed)
method_declaration (+415 nodes collapsed)
method_declaration (+192 nodes collapsed)
} "}"
} "}"