Skip to content
This repository was archived by the owner on Feb 3, 2025. It is now read-only.

Commit

Permalink
Merge pull request prose#137 from iElectric/patch-1
Browse files Browse the repository at this point in the history
Rewrite route regex to better handle directory names with dots
  • Loading branch information
michael committed Jun 26, 2012
2 parents 903883e + 94034ba commit 59f2a57
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions _includes/routers/application.js
Original file line number Diff line number Diff line change
@@ -8,8 +8,7 @@ routers.Application = Backbone.Router.extend({
// Using this.route, because order matters
this.route(":repo", 'posts', this.posts);
this.route(/(.*\/.*)/, 'posts', this.posts);
this.route(/(.*\/.*)\/(.*\..*)$/, 'post', this.post);
this.route(/(.*\/.*)\/(.*\..*)(\/edit)$/, 'post', this.post);
this.route(/(.*\/.*)\/(.*\.\w+)$/, 'post', this.post);
this.route(/(.*\/.*)\/(.*)(\/edit)$/, 'post', this.post);
this.route(/(.*\/.*)\/new$/, 'new_post', this.newPost);
this.route("", "start", this.start);

0 comments on commit 59f2a57

Please sign in to comment.