Created
October 3, 2010 22:44
-
-
Save dariocravero/609022 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Small reformats | |
if !absolute_map | |
path.gsub!(%r{/?index/?}, '') # Remove index path | |
path[0,0] = "/" unless path =~ %r{^\(?/} # Paths must start with a / | |
path.sub!(%r{/(\))?$}, '\\1') # Remove latest trailing delimiter | |
path.gsub!(/\/(\(\.|$)/, '\\1') # Remove trailing slashes | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment