normalizePath handles spaces for use in resolvePath
This commit is contained in:
parent
018616dc68
commit
f7c2dec8e8
BIN
example/Photo 1-lobby_FS.jpg
Normal file
BIN
example/Photo 1-lobby_FS.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.4 MiB |
@ -12,6 +12,9 @@
|
||||
_posts: {
|
||||
"2015-02-14-this-is-a-post.md": {
|
||||
content: "---\ntitle: This is a YAML front matter post\nimage: /nf-logo.png\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
},
|
||||
"2015-02-14-this-is-test-post.md": {
|
||||
content: "---\ntitle: This is a test post\nimage: /Photo 1-lobby_FS.jpg\ndate: 2015-02-14T00:00:00.000Z\n---\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
},
|
||||
"2015-02-15-this-is-a-json-frontmatter-post.md": {
|
||||
content: "{\n\"title\": \"This is a JSON front matter post\",\n\"image\": \"/nf-logo.png\",\n\"date\": \"2015-02-15T00:00:00.000Z\"\n}\n\n# I Am a Title in Markdown\n\nHello, world\n\n* One Thing\n* Another Thing\n* A Third Thing\n"
|
||||
|
@ -1,5 +1,5 @@
|
||||
const absolutePath = new RegExp('^(?:[a-z]+:)?//', 'i');
|
||||
const normalizePath = path => path.replace(/[\\\/]+/g, '/');
|
||||
const normalizePath = path => path.replace(/[\\\/]+/g, '/').replace(/[\s]+/g, '%20');
|
||||
|
||||
export function resolvePath(path, basePath) { // eslint-disable-line
|
||||
// No path provided, skip
|
||||
|
Loading…
x
Reference in New Issue
Block a user