diff --git a/src/gui/FlashcardReviewView.tsx b/src/gui/FlashcardReviewView.tsx index 5921cae2..762416db 100644 --- a/src/gui/FlashcardReviewView.tsx +++ b/src/gui/FlashcardReviewView.tsx @@ -341,9 +341,17 @@ export class FlashcardReviewView { private _formatQuestionContextText(questionContext: string[]): string { const separator: string = " > "; let result = this._currentNote.file.basename; - if (questionContext.length > 0) { - result += separator + questionContext.join(separator); - } + questionContext.forEach((context) => { + // Check for links trim [[ ]] + if (context.startsWith("[[") && context.endsWith("]]")) { + context = context.replace("[[", "").replace("]]", ""); + // Use replacement text if any + if (context.contains("|")) { + context = context.split("|")[1]; + } + } + result += separator + context; + }); return result + separator + "..."; }