fix: only trim periods from file extensions (#1554)
This commit is contained in:
parent
660ce8687c
commit
95c744ee3e
@ -39,7 +39,7 @@ const selectors = {
|
|||||||
return `${ collection.get('folder').replace(/\/$/, '') }/${ slug }.${ this.entryExtension(collection) }`;
|
return `${ collection.get('folder').replace(/\/$/, '') }/${ slug }.${ this.entryExtension(collection) }`;
|
||||||
},
|
},
|
||||||
entrySlug(collection, path) {
|
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() {
|
listMethod() {
|
||||||
return 'entriesByFolder';
|
return 'entriesByFolder';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user