Prechádzať zdrojové kódy

since unquoted strings are getting quoted with single quotes treat them the same

ruduki2 5 rokov pred
rodič
commit
56571d09c9
1 zmenil súbory, kde vykonal 2 pridanie a 3 odobranie
  1. 2 3
      Rakefile

+ 2 - 3
Rakefile

@@ -170,9 +170,8 @@ task :autofix do
             text = "\"#{text}\""
           elsif link =~ /\A[\[\]'"\\]*\z/
             text.gsub!(/(?<!\\)'/) { "\\'" }
-            text.gsub!(/(?<!\\)"/) { "\\\"" }
-            text.gsub!(/(?<!\\)\\(?!['"])/) { "\\\\" }
-            text = "'" + (text.gsub("'") { "\\'" }) + "'"
+            text.gsub!(/(?<!\\)\\(?!')/) { "\\\\" }
+            text = "'" + text + "'"
           end
           "[[#{text}->#{dest}]#{link_mods}]"
         else