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–276 unchanged (276 lines)
277 // merge attributes onto real html
278 Element html = tb.getStack().getFirst();
279 for (Attribute attribute : startTag.getAttributes()) {
280 if (!html.hasAttr(attribute.getKey()))
281 html.attributes().put(attribute);
282 }
283 } else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "style", "title")) {
284 return tb.process(t, InHead);
285 } else if (name.equals("body")) {
286 tb.error(this);
287 LinkedList<Element> stack = tb.getStack();
288 if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
289 // only in fragment case
…lines 290–1483 unchanged (1194 lines)

After

…lines 1–276 unchanged (276 lines)
277 // merge attributes onto real html
278 Element html = tb.getStack().getFirst();
279 for (Attribute attribute : startTag.getAttributes()) {
280 if (!html.hasAttr(attribute.getKey()))
281 html.attributes().put(attribute);
282 }
283 } else if (StringUtil.in(name, "base", "basefont", "bgsound", "command", "link", "meta", "noframes", "script", "style", "title")) {
284 return tb.process(t, InHead);
285 } else if (name.equals("body")) {
286 tb.error(this);
287 LinkedList<Element> stack = tb.getStack();
288 if (stack.size() == 1 || (stack.size() > 2 && !stack.get(1).nodeName().equals("body"))) {
289 // only in fragment case
…lines 290–1483 unchanged (1194 lines)

Before

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "DescendableLinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "StringUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
block_comment "/**\n * The Tree Builder's current state. Each state embodies"...
enum_declaration
enum "enum"
identifier "TreeBuilderState"
enum_body
{ "{"
enum_constant (+240 nodes collapsed)
, ","
enum_constant (+342 nodes collapsed)
, ","
enum_constant (+402 nodes collapsed)
, ","
enum_constant (+738 nodes collapsed)
, ","
enum_constant (+467 nodes collapsed)
, ","
enum_constant (+602 nodes collapsed)
, ","
enum_constant
identifier "InBody"
class_body
{ "{"
method_declaration
boolean_type "boolean"
identifier "process"
formal_parameters
( "("
formal_parameter
type_identifier "Token"
identifier "t"
, ","
formal_parameter
type_identifier "TreeBuilder"
identifier "tb"
) ")"
block
{ "{"
switch_expression
switch "switch"
parenthesized_expression
( "("
field_access
identifier "t"
. "."
identifier "type"
) ")"
switch_block
{ "{"
switch_block_statement_group (+131 nodes collapsed)
switch_block_statement_group (+27 nodes collapsed)
switch_block_statement_group (+22 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
identifier "StartTag"
: ":"
local_variable_declaration
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "StartTag"
variable_declarator
identifier "startTag"
= "="
method_invocation
identifier "t"
. "."
identifier "asStartTag"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "name"
= "="
method_invocation
identifier "startTag"
. "."
identifier "name"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "name"
. "."
identifier "equals"
argument_list
( "("
string_literal
" "\""
string_fragment "html"
" "\""
) ")"
) ")"
block (+87 nodes collapsed)
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "StringUtil"
. "."
identifier "in"
argument_list
( "("
identifier "name"
, ","
string_literal
" "\""
string_fragment "base"
" "\""
, ","
string_literal
" "\""
string_fragment "basefont"
" "\""
, ","
string_literal
" "\""
string_fragment "bgsound"
" "\""
, ","
string_literal
" "\""
string_fragment "command"
" "\""
, ","
string_literal
" "\""
string_fragment "link"
" "\""
, ","
string_literal
" "\""
string_fragment "meta"
" "\""
, ","
string_literal
" "\""
string_fragment "noframes"
" "\""
, ","
string_literal
" "\""
string_fragment "style"
" "\""
, ","
string_literal
" "\""
string_fragment "title"
" "\""
) ")"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "tb"
. "."
identifier "process"
argument_list
( "("
identifier "t"
, ","
identifier "InHead"
) ")"
; ";"
} "}"
else "else"
if_statement (+3811 nodes collapsed)
break_statement
break "break"
; ";"
switch_block_statement_group (+2302 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
identifier "EOF"
: ":"
line_comment "// todo: error if stack contains something not dd, dt, li, p"...
line_comment "// stop parsing"
break_statement
break "break"
; ";"
} "}"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+219 nodes collapsed)
} "}"
, ","
enum_constant (+162 nodes collapsed)
, ","
enum_constant (+1189 nodes collapsed)
, ","
enum_constant (+340 nodes collapsed)
, ","
enum_constant (+503 nodes collapsed)
, ","
enum_constant (+485 nodes collapsed)
, ","
enum_constant (+688 nodes collapsed)
, ","
enum_constant (+658 nodes collapsed)
, ","
enum_constant (+652 nodes collapsed)
, ","
enum_constant (+1056 nodes collapsed)
, ","
enum_constant (+315 nodes collapsed)
, ","
enum_constant (+305 nodes collapsed)
, ","
enum_constant (+540 nodes collapsed)
, ","
enum_constant (+311 nodes collapsed)
, ","
enum_constant (+182 nodes collapsed)
, ","
enum_constant (+236 nodes collapsed)
, ","
enum_constant (+26 nodes collapsed)
enum_body_declarations (+290 nodes collapsed)
} "}"

After

program
package_declaration
package "package"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "parser"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "DescendableLinkedList"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "helper"
. "."
identifier "StringUtil"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "org"
. "."
identifier "jsoup"
. "."
identifier "nodes"
. "."
asterisk
* "*"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "Iterator"
; ";"
import_declaration
import "import"
scoped_identifier
scoped_identifier
identifier "java"
. "."
identifier "util"
. "."
identifier "LinkedList"
; ";"
block_comment "/**\n * The Tree Builder's current state. Each state embodies"...
enum_declaration
enum "enum"
identifier "TreeBuilderState"
enum_body
{ "{"
enum_constant (+240 nodes collapsed)
, ","
enum_constant (+342 nodes collapsed)
, ","
enum_constant (+402 nodes collapsed)
, ","
enum_constant (+738 nodes collapsed)
, ","
enum_constant (+467 nodes collapsed)
, ","
enum_constant (+602 nodes collapsed)
, ","
enum_constant
identifier "InBody"
class_body
{ "{"
method_declaration
boolean_type "boolean"
identifier "process"
formal_parameters
( "("
formal_parameter
type_identifier "Token"
identifier "t"
, ","
formal_parameter
type_identifier "TreeBuilder"
identifier "tb"
) ")"
block
{ "{"
switch_expression
switch "switch"
parenthesized_expression
( "("
field_access
identifier "t"
. "."
identifier "type"
) ")"
switch_block
{ "{"
switch_block_statement_group (+131 nodes collapsed)
switch_block_statement_group (+27 nodes collapsed)
switch_block_statement_group (+22 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
identifier "StartTag"
: ":"
local_variable_declaration
scoped_type_identifier
type_identifier "Token"
. "."
type_identifier "StartTag"
variable_declarator
identifier "startTag"
= "="
method_invocation
identifier "t"
. "."
identifier "asStartTag"
argument_list
( "("
) ")"
; ";"
local_variable_declaration
type_identifier "String"
variable_declarator
identifier "name"
= "="
method_invocation
identifier "startTag"
. "."
identifier "name"
argument_list
( "("
) ")"
; ";"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "name"
. "."
identifier "equals"
argument_list
( "("
string_literal
" "\""
string_fragment "html"
" "\""
) ")"
) ")"
block (+87 nodes collapsed)
else "else"
if_statement
if "if"
parenthesized_expression
( "("
method_invocation
identifier "StringUtil"
. "."
identifier "in"
argument_list
( "("
identifier "name"
, ","
string_literal
" "\""
string_fragment "base"
" "\""
, ","
string_literal
" "\""
string_fragment "basefont"
" "\""
, ","
string_literal
" "\""
string_fragment "bgsound"
" "\""
, ","
string_literal
" "\""
string_fragment "command"
" "\""
, ","
string_literal
" "\""
string_fragment "link"
" "\""
, ","
string_literal
" "\""
string_fragment "meta"
" "\""
, ","
string_literal
" "\""
string_fragment "noframes"
" "\""
, ","
string_literal
" "\""
string_fragment "script"
" "\""
, ","
string_literal
" "\""
string_fragment "style"
" "\""
, ","
string_literal
" "\""
string_fragment "title"
" "\""
) ")"
) ")"
block
{ "{"
return_statement
return "return"
method_invocation
identifier "tb"
. "."
identifier "process"
argument_list
( "("
identifier "t"
, ","
identifier "InHead"
) ")"
; ";"
} "}"
else "else"
if_statement (+3811 nodes collapsed)
break_statement
break "break"
; ";"
switch_block_statement_group (+2302 nodes collapsed)
switch_block_statement_group
switch_label
case "case"
identifier "EOF"
: ":"
line_comment "// todo: error if stack contains something not dd, dt, li, p"...
line_comment "// stop parsing"
break_statement
break "break"
; ";"
} "}"
return_statement
return "return"
true "true"
; ";"
} "}"
method_declaration (+219 nodes collapsed)
} "}"
, ","
enum_constant (+162 nodes collapsed)
, ","
enum_constant (+1189 nodes collapsed)
, ","
enum_constant (+340 nodes collapsed)
, ","
enum_constant (+503 nodes collapsed)
, ","
enum_constant (+485 nodes collapsed)
, ","
enum_constant (+688 nodes collapsed)
, ","
enum_constant (+658 nodes collapsed)
, ","
enum_constant (+652 nodes collapsed)
, ","
enum_constant (+1056 nodes collapsed)
, ","
enum_constant (+315 nodes collapsed)
, ","
enum_constant (+305 nodes collapsed)
, ","
enum_constant (+540 nodes collapsed)
, ","
enum_constant (+311 nodes collapsed)
, ","
enum_constant (+182 nodes collapsed)
, ","
enum_constant (+236 nodes collapsed)
, ","
enum_constant (+26 nodes collapsed)
enum_body_declarations (+290 nodes collapsed)
} "}"