summaryrefslogtreecommitdiff
path: root/lib/coderay/helpers
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coderay/helpers')
-rw-r--r--lib/coderay/helpers/file_type.rb1
-rw-r--r--lib/coderay/helpers/plugin.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/coderay/helpers/file_type.rb b/lib/coderay/helpers/file_type.rb
index 5e3a1e7..e8a7b75 100644
--- a/lib/coderay/helpers/file_type.rb
+++ b/lib/coderay/helpers/file_type.rb
@@ -68,6 +68,7 @@ module CodeRay
File.open filename, 'r' do |f|
if first_line = f.gets
if type = first_line[TypeFromShebang]
+ # FIXME: cache attack
type.to_sym
end
end
diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb
index d14c5a9..3a38bfd 100644
--- a/lib/coderay/helpers/plugin.rb
+++ b/lib/coderay/helpers/plugin.rb
@@ -207,6 +207,7 @@ module CodeRay
id
elsif id.is_a? String
if id[/\w+/] == id
+ # FIXME: cache attack
id.downcase.to_sym
else
raise ArgumentError, "Invalid id given: #{id}"