We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6dd14ef commit 82864efCopy full SHA for 82864ef
lib/coderay/scanners/go.rb
@@ -44,7 +44,7 @@ class Go < Scanner
44
add(PREDEFINED_FUNCTIONS, :predefined) # :nodoc:
45
46
ESCAPE = / [rbfntv\n\\'"] | x[a-fA-F0-9]{1,2} | [0-7]{1,3} /x # :nodoc:
47
- UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x # :nodoc:
+ UNICODE_ESCAPE = / u[a-fA-F0-9]{4} | U[a-fA-F0-9]{8} /x # :nodoc:
48
49
protected
50
@@ -123,7 +123,7 @@ def scan_tokens encoder, options
123
label_expected_before_preproc_line = label_expected
124
state = :include_expected if self[1] == 'include'
125
126
- elsif match = scan(/ L?' (?: [^\'\n\\] | \\ #{ESCAPE} )? '? /ox)
+ elsif match = scan(/ L?' (?: [^\'\n\\] | \\ (?: #{ESCAPE} | #{UNICODE_ESCAPE} ) )? '? /ox)
127
label_expected = false
128
encoder.text_token match, :char
129
0 commit comments