|
@@ -4,7 +4,7 @@ function parseMd(content) {
|
|
|
var blockCount;
|
|
|
var preDataIndex;
|
|
|
var parseBlockDiv;
|
|
|
- var url;
|
|
|
+ var url, contentUr;
|
|
|
var preImg, preImgObject;
|
|
|
var preImgObject = {'image': {}}
|
|
|
var isNotFrontMatterCount = 0;
|
|
@@ -16,7 +16,8 @@ function parseMd(content) {
|
|
|
isNotFrontMatterCount += 1;
|
|
|
}
|
|
|
if (line.includes('url:')) {
|
|
|
- url = 'http://localhost:1313/' + line.replace(/url:| |"/g, '') + '/';
|
|
|
+ contentUr = line.replace(/url:| |"/g, '');
|
|
|
+ url = `http://localhost:1313/${contentUr}/`;
|
|
|
}
|
|
|
continue;
|
|
|
}
|
|
@@ -67,7 +68,7 @@ function parseMd(content) {
|
|
|
}
|
|
|
imgRemoveButton.onclick = function() {
|
|
|
removeImgElement(img, imgInput, widthInput, heightInput, imgInputButton, imgRemoveButton);
|
|
|
- blockArray = removeImgData(blockArray, preBlockindex, imgDataIndex);
|
|
|
+ blockArray = removeImgData(blockArray, preBlockindex, imgDataIndex, contentUr);
|
|
|
}
|
|
|
}
|
|
|
} else if (line.includes('amp-img')) {
|
|
@@ -93,7 +94,7 @@ function parseMd(content) {
|
|
|
}
|
|
|
imgRemoveButton.onclick = function() {
|
|
|
removeImgElement(img, imgInput, widthInput, heightInput, imgInputButton, imgRemoveButton);
|
|
|
- blockArray = removeImgData(blockArray, preBlockindex, imgDataIndex);
|
|
|
+ blockArray = removeImgData(blockArray, preBlockindex, imgDataIndex, contentUr);
|
|
|
}
|
|
|
} else {
|
|
|
if (parseBlockDiv === undefined){
|