From a12dac7f5211f0d5ef7e1dd36466399026255e6b Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Fri, 27 Mar 2015 15:40:55 -0400 Subject: [PATCH] format_varname: contract contractions --- format.php | 1 + 1 file changed, 1 insertion(+) diff --git a/format.php b/format.php index c913864..81878eb 100644 --- a/format.php +++ b/format.php @@ -173,6 +173,7 @@ function format_slug($str) { function format_varname($str) { $str = preg_replace("/([a-z])([A-Z])/", "\\1_\\2", $str); # split words on camelCase $str = strtolower($str); + $str = preg_replace("/['‘’]/", '', $str); $str = preg_replace('/[^a-z0-9_]+/', '_', $str); return preg_replace('/^([^a-z_])/', "_\\1", $str); } -- 1.7.10.4