fix: only trim periods from file extensions (#1554)

This commit is contained in:
Caleb 2018-07-31 13:48:42 -06:00 committed by Shawn Erquhart
parent 660ce8687c
commit 95c744ee3e

View File

@ -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';