diff options
author | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-20 18:12:04 +0200 |
---|---|---|
committer | Kornelius Kalnbach <murphy@rubychan.de> | 2013-07-20 18:12:04 +0200 |
commit | 5c23a731ca55729fc65630eca3b37a5b1a71e5b1 (patch) | |
tree | 97045ac6fa9544a1e0f168b9a02c7b53b0c4e452 /lib/coderay/scanners/python.rb | |
parent | 59ca07b0d1a1710ab729636ea00de4b638f56110 (diff) | |
download | coderay-5c23a731ca55729fc65630eca3b37a5b1a71e5b1.tar.gz |
mark possibly problematic spots with FIXME
Diffstat (limited to 'lib/coderay/scanners/python.rb')
-rw-r--r-- | lib/coderay/scanners/python.rb | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/coderay/scanners/python.rb b/lib/coderay/scanners/python.rb index 09c8b6e..23630f9 100644 --- a/lib/coderay/scanners/python.rb +++ b/lib/coderay/scanners/python.rb @@ -75,10 +75,12 @@ module Scanners <<=? | >>=? | [<>=]=? | != # comparison and assignment /x # :nodoc: + # FIXME: cache attack STRING_DELIMITER_REGEXP = Hash.new { |h, delimiter| h[delimiter] = Regexp.union delimiter # :nodoc: } + # FIXME: cache attack STRING_CONTENT_REGEXP = Hash.new { |h, delimiter| h[delimiter] = / [^\\\n]+? (?= \\ | $ | #{Regexp.escape(delimiter)} ) /x # :nodoc: } @@ -183,6 +185,7 @@ module Scanners kind = :ident elsif kind == :keyword state = DEF_NEW_STATE[match] + # FIXME: cache attack from_import_state << match.to_sym if state == :include_expected end encoder.text_token match, kind |