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 621c01a commit 9f9a3bcCopy full SHA for 9f9a3bc
lib/coderay/scanners/bash.rb
@@ -106,7 +106,7 @@ def scan_tokens encoder, options
106
@shell = (not @shell)
107
encoder.text_token(match, :delimiter)
108
next
109
- elsif match = scan(/'[^']*'/)
+ elsif match = scan(/'[^']*'?/)
110
kind = :string
111
elsif match = scan(/(?: \& | > | < | \| >> | << | >\& )/ox)
112
kind = :bin
@@ -222,6 +222,10 @@ def scan_tokens encoder, options
222
encoder.text_token(match, kind)
223
end
224
225
+ if @state == :quote
226
+ encoder.end_group :string
227
+ end
228
+
229
encoder
230
231
0 commit comments