Skip to content

Commit 50f0631

Browse files
committed
fix issue #10
array names can now contain also numbers and other chars to prevent scanner issue errors
1 parent f897d99 commit 50f0631

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/coderay/scanners/bash.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ def scan_tokens encoder, options
264264

265265

266266
def match_array(match, encoder)
267-
match =~ /([A-Za-z_]+)\[(.*?)\]/
267+
match =~ /(.+)\[(.*?)\]/
268268
var = $1
269269
key = $2
270270
kind = IDENT_KIND[var]

0 commit comments

Comments
 (0)