Skip to content

Commit 27c616c

Browse files
committed
Revert "Updated regular expression to avoid errors when converting to Float()"
This reverts commit 9f706fe.
1 parent 7ef7547 commit 27c616c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/prawn/text/formatted/parser.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ def self.array_from_tokens(tokens)
238238
/name='([^']*)'/.match(token)
239239
fonts << matches[1] unless matches.nil?
240240

241-
matches = /size=".*?(\d+(?:\.\d+)?).*?"/.match(token) ||
242-
/size='.*?(\d+(?:\.\d+)?).*?'/.match(token)
241+
matches = /size="([^"]*)"/.match(token) ||
242+
/size='([^']*)'/.match(token)
243243
size = (Float(matches[1]) rescue nil) unless matches.nil?
244244
sizes << size unless size.nil?
245245

0 commit comments

Comments
 (0)