Skip to content

Commit

Permalink
fix bug #51 : user can now add image url without extension file to im…
Browse files Browse the repository at this point in the history
…age-gallery
  • Loading branch information
LouisBarranqueiro committed Jul 18, 2015
1 parent 5168f66 commit 4e8a530
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions layout/_partial/post/gallery.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
<% var photoUrl; %>
<% if ((photo.indexOf(config.url) < 0) && (photo.indexOf('://') >= 0)) { %>
<% photoUrl = photo; %>
<% if (!/.+\.[a-zA-Z0-9]{3,4}$/.test(photo)) { %>
<% photoUrl = photoUrl + "#.jpg"; %>
<% } %>
<% } else { %>
<% photoUrl = url_for(post.path.replace('.html', '/') + photo); %>
<% } %>
Expand Down

0 comments on commit 4e8a530

Please sign in to comment.