X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=format.php;h=81878eb7813abaed483f084b000998c237678ad0;hb=56892b42cb4895e601c8de375d833806772673e9;hp=c913864d87c73c7c4c43086ce3eca6370ce12f2e;hpb=e057305351d93155bf9f0d2c664b6eb859d83bf4;p=wfpl.git 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); }