Skip to content
Permalink
Browse files

Allowed extra line breaks with closure parameters.

  • Loading branch information...
twostraws committed Mar 17, 2019
1 parent 4b36024 commit bcf5bd48cea9890995040c29be1f38f3d916eca5
Showing with 1 addition and 1 deletion.
  1. +1 −1 Unwrap/Extensions/String-Variables.swift
@@ -58,7 +58,7 @@ extension String {
replaced = replaced.anonymizingComponent("func +[A-Za-z_][A-Za-z0-9_]* *\\((?:([A-Za-z_]*[A-Za-z0-9_]* *[A-Za-z_][A-Za-z0-9_]*) *: *[A-Za-z_][A-Za-z0-9_]*,? *)*", replacementWrapper: "%")

// Anonymize a closure parameter if one was provided. (This only handles single parameters, but that's enough here.)
replaced = replaced.anonymizingComponent("\\{\n([A-Za-z_][A-Za-z0-9_]*) in", replacementWrapper: "§")
replaced = replaced.anonymizingComponent("\\{\n+([A-Za-z_][A-Za-z0-9_]*) in", replacementWrapper: "§")

// Anonymize function names.
replaced = replaced.anonymizingComponent("func +([A-Za-z_][A-Za-z0-9_]*)", replacementWrapper: "#")

0 comments on commit bcf5bd4

Please sign in to comment.
You can’t perform that action at this time.