Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix document rendered repeatedly bug #557

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 27 additions & 3 deletions src/compiler/GardenPageCompiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,10 @@ export class GardenPageCompiler {
headerSplit.length > 1 ? `#${headerSplit[1]}` : "";
}
const fullLinkedFilePath = getLinkpath(linkedFileName);


if (fullLinkedFilePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
fullLinkedFilePath,
file.getPath(),
Expand Down Expand Up @@ -310,7 +313,10 @@ export class GardenPageCompiler {

const transclusionFilePath =
getLinkpath(transclusionFileName);


if (transclusionFilePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
transclusionFilePath,
file.getPath(),
Expand Down Expand Up @@ -511,7 +517,10 @@ export class GardenPageCompiler {
.substring(svg.indexOf("[") + 2, svg.indexOf("]"))
.split("|");
const imagePath = getLinkpath(imageName);


if (imagePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
imagePath,
file.getPath(),
Expand Down Expand Up @@ -556,6 +565,9 @@ export class GardenPageCompiler {
continue;
}

if (imagePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
imagePath,
file.getPath(),
Expand Down Expand Up @@ -602,6 +614,9 @@ export class GardenPageCompiler {
.split("|");
const imagePath = getLinkpath(imageName);

if (imagePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
imagePath,
file.getPath(),
Expand Down Expand Up @@ -637,6 +652,9 @@ export class GardenPageCompiler {

const decodedImagePath = decodeURI(imagePath);

if (decodedImagePath === "") {
continue;
}
const linkedFile = this.metadataCache.getFirstLinkpathDest(
decodedImagePath,
file.getPath(),
Expand Down Expand Up @@ -716,6 +734,9 @@ export class GardenPageCompiler {

const imagePath = getLinkpath(imageName);

if (imagePath === "") {
continue;
}
const linkedFile =
this.metadataCache.getFirstLinkpathDest(
imagePath,
Expand Down Expand Up @@ -789,6 +810,9 @@ export class GardenPageCompiler {

const decodedImagePath = decodeURI(imagePath);

if (decodedImagePath === "") {
continue;
}
const linkedFile =
this.metadataCache.getFirstLinkpathDest(
decodedImagePath,
Expand Down