Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
--- untitled +++ (clipboard) @@ -12,12 +12,11 @@ // have one extension chopped off, but there might be more than one, // such as with .tpl.php $template = substr($template, 0, strpos($template, '.')); - // Transform - in filenames to _ to match function naming scheme // for the purposes of searching. - $search_template = strtr($template, '-', '_'); - if (isset($cache[$search_template])) { - $templates[$template] = array( + $hook = strtr($template, '-', '_'); + if (isset($cache[$hook])) { + $templates[$hook] = array( 'file' => $template, 'path' => dirname($file->filename), );
This paste will be private.
From the Design Piracy series on my blog: