fix getFileExtension missing numeric extensions (e.g. mp4)
| | |
| | | } |
| | | |
| | | segments.push(timeTaken) |
| | | return ( |
| | | <p class="content-meta">{segments.join(", ")}</p> |
| | | ) |
| | | return <p class="content-meta">{segments.join(", ")}</p> |
| | | } else { |
| | | return null |
| | | } |
| | |
| | | ["/content/index.md", "content/index"], |
| | | ["content/cool.png", "content/cool"], |
| | | ["index.md", "index"], |
| | | ["test.mp4", "test"], |
| | | ["note with spaces.md", "note-with-spaces"], |
| | | ], |
| | | path.slugifyFilePath, |
| | |
| | | } |
| | | |
| | | function _getFileExtension(s: string): string | undefined { |
| | | return s.match(/\.[A-Za-z]+$/)?.[0] |
| | | return s.match(/\.[A-Za-z0-9]+$/)?.[0] |
| | | } |
| | | |
| | | function _isRelativeSegment(s: string): boolean { |