File tree 2 files changed +5
-1
lines changed
2 files changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,7 @@ p=. _This files lists all changes in the CodeRay library since the 0.9.8 release
7
7
h2. Next Version
8
8
9
9
* add @:string/:char@, remove @:regexp/:function@ color from Terminal encoder [GH #29, thanks to Kyrylo Silin]
10
+ * Fix HTML scanner: Don't crash if HTML in a diff contains a JavaScript tag.
10
11
11
12
h2. Changes in 1.0.7
12
13
Original file line number Diff line number Diff line change @@ -69,6 +69,7 @@ def reset
69
69
def setup
70
70
@state = :initial
71
71
@plain_string_content = nil
72
+ @in_tag = nil
72
73
end
73
74
74
75
def scan_java_script encoder , code
@@ -83,7 +84,8 @@ def scan_java_script encoder, code
83
84
def scan_tokens encoder , options
84
85
state = options [ :state ] || @state
85
86
plain_string_content = @plain_string_content
86
- in_tag = in_attribute = nil
87
+ in_tag = @in_tag
88
+ in_attribute = nil
87
89
88
90
encoder . begin_group :string if state == :attribute_value_string
89
91
@@ -237,6 +239,7 @@ def scan_tokens encoder, options
237
239
if options [ :keep_state ]
238
240
@state = state
239
241
@plain_string_content = plain_string_content
242
+ @in_tag = in_tag
240
243
end
241
244
242
245
encoder . end_group :string if state == :attribute_value_string
You can’t perform that action at this time.
0 commit comments