Skip to content

Commit fe4c756

Browse files
committed
feat: add marked-footnote extension for markdown footnote rendering
1 parent 71c7550 commit fe4c756

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"dotenv": "^16.3.1",
4040
"esbuild-plugin-env": "^1.0.8",
4141
"marked": "^11.0.0",
42+
"marked-footnote": "^1.2.4",
4243
"wrangler": "^3.83.0"
4344
},
4445
"devDependencies": {

src/home/rendering/render-github-issues.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { marked } from "marked";
2+
import markedFootnote from "marked-footnote";
23
import { organizationImageCache } from "../fetch-github/fetch-issues-full";
34
import { GitHubIssue } from "../github-types";
45
import { taskManager } from "../home";
@@ -170,6 +171,9 @@ export async function viewIssueDetails(full: GitHubIssue) {
170171
bottomBar.prepend(clonedLabels);
171172
}
172173

174+
// Use footnote extension for `marked`
175+
marked.use(markedFootnote());
176+
173177
// Set the issue body content using `marked`
174178
modalBodyInner.innerHTML = marked(full.body) as string;
175179

0 commit comments

Comments
 (0)