File tree Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Expand file tree Collapse file tree 4 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1052,7 +1052,8 @@ def self._(str); str end
1052
1052
_ ( "Unexpected end table tag in caption. Generates implied end caption." ) ,
1053
1053
"end-html-in-innerhtml" => _ ( "Unexpected html end tag in inner html mode." ) ,
1054
1054
"expected-self-closing-tag" => _ ( "Expected a > after the /." ) ,
1055
- "self-closing-end-tag" => _ ( "Self closing end tag." )
1055
+ "self-closing-end-tag" => _ ( "Self closing end tag." ) ,
1056
+ "eof-in-table" => _ ( "Unexpected end of file. Expected table content." )
1056
1057
}
1057
1058
1058
1059
end
Original file line number Diff line number Diff line change @@ -74,6 +74,10 @@ def endTagOther(name)
74
74
@parser . phases [ :inTable ] . processEndTag ( name )
75
75
end
76
76
77
+ def process_eof
78
+ @parser . phases [ :inTable ] . process_eof
79
+ end
80
+
77
81
protected
78
82
79
83
# XXX unify this with other table helper methods
Original file line number Diff line number Diff line change @@ -17,6 +17,10 @@ def processSpaceCharacters(data)
17
17
@parser . phases [ :inTable ] . processSpaceCharacters ( data )
18
18
end
19
19
20
+ def process_eof
21
+ @parser . phases [ :inTable ] . process_eof
22
+ end
23
+
20
24
def startTagTr ( name , attributes )
21
25
clearStackToTableBodyContext
22
26
@tree . insert_element ( name , attributes )
Original file line number Diff line number Diff line change @@ -38,6 +38,14 @@ def processCharacters(data)
38
38
end
39
39
end
40
40
41
+ def process_eof
42
+ if @tree . open_elements . last . name != "html"
43
+ @parser . parse_error ( "eof-in-table" )
44
+ else
45
+ assert @parser . innerHTML
46
+ end
47
+ end
48
+
41
49
def startTagCaption ( name , attributes )
42
50
clear_stack_to_table_context
43
51
@tree . activeFormattingElements . push ( Marker )
You can’t perform that action at this time.
0 commit comments