Skip to content

Commit

Permalink
fix: only trim periods from file extensions (#1554)
Browse files Browse the repository at this point in the history
  • Loading branch information
tech4him1 authored and erquhart committed Jul 31, 2018
1 parent 660ce86 commit 95c744e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/netlify-cms-core/src/reducers/collections.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const selectors = {
return `${ collection.get('folder').replace(/\/$/, '') }/${ slug }.${ this.entryExtension(collection) }`;
},
entrySlug(collection, path) {
return path.split('/').pop().replace(new RegExp(`\.${ escapeRegExp(this.entryExtension(collection)) }$`), '');
return path.split('/').pop().replace(new RegExp(`\\.${ escapeRegExp(this.entryExtension(collection)) }$`), '');
},
listMethod() {
return 'entriesByFolder';
Expand Down

0 comments on commit 95c744e

Please sign in to comment.