Permalink
Browse files

Collapse funky Ruby string literals %q{} and %Q{}

  • Loading branch information...
1 parent 775633c commit 5c21693783fef2a39f216f2688768ad676d505fc khiltd committed Apr 16, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 Abacus.py
View
@@ -102,7 +102,7 @@ def find_candidates_for_separator(self, separator, candidates):
line_content = self.view.substr(line)
collapsed = line_content
- for match in re.finditer(r"(\"[^\"]*(?<!\\)\"|'[^']*(?<!\\)')", line_content):
+ for match in re.finditer(r"(\"[^\"]*(?<!\\)\"|'[^']*(?<!\\)'|\%(q|Q)?\{.*\})", line_content):
quoted_string = match.group(0)
collapsed = collapsed.replace(quoted_string, "\007" * len(quoted_string))

0 comments on commit 5c21693

Please sign in to comment.