aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2012-07-24 11:23:06 -0500
committerJoshua Peek <josh@joshpeek.com>2012-07-24 11:23:06 -0500
commitf5705eaf3872fa5872dd7500483f8c01e53d9768 (patch)
tree84e23a1f224c966b71052a92b88de085085953f5 /lib
parente2a91bba3e114227e80beef5b62b53be3dab183c (diff)
Parse float tokens
Diffstat (limited to 'lib')
-rw-r--r--lib/linguist/tokenizer.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/linguist/tokenizer.rb b/lib/linguist/tokenizer.rb
index 520ed5c..e591214 100644
--- a/lib/linguist/tokenizer.rb
+++ b/lib/linguist/tokenizer.rb
@@ -69,7 +69,7 @@ module Linguist
s.skip_until(/[^\\]'/)
# Skip number literals
- elsif s.scan(/(0x)?\d+/)
+ elsif s.scan(/(0x)?\d(\d|\.)*/)
# SGML style brackets
elsif token = s.scan(/<[^\s<>][^<>]*>/)