Set default path for images
This commit is contained in:
parent
c8ab797a15
commit
fdf0e419bb
@ -49,15 +49,12 @@ function convertTextNode(node) {
|
||||
const imageNode = {
|
||||
type: "image",
|
||||
//TODO: Use some kind of option to pass in default images path
|
||||
url: encodeURI(match[1]), //encode white space from file name
|
||||
url: encodeURI(`/images/${match[1]}`), //encode white space from file name
|
||||
alt: match[1],
|
||||
};
|
||||
|
||||
children.push(imageNode);
|
||||
|
||||
if (typeof match[0] !== "string") {
|
||||
console.log("THE FUCK again")
|
||||
}
|
||||
let matchEndIndex = match.index + match[0].length;
|
||||
startIndex = matchEndIndex;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user