Skip to content

Commit

Permalink
Merge pull request #186 from koya0/development
Browse files Browse the repository at this point in the history
feat: markdown footnote rendering
  • Loading branch information
zugdev authored Dec 21, 2024
2 parents 71c7550 + 1fc154b commit 231c312
Show file tree
Hide file tree
Showing 3 changed files with 5,978 additions and 8,279 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
"dotenv": "^16.3.1",
"esbuild-plugin-env": "^1.0.8",
"marked": "^11.0.0",
"marked-footnote": "^1.2.4",
"wrangler": "^3.83.0"
},
"devDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions src/home/rendering/render-github-issues.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { marked } from "marked";
import markedFootnote from "marked-footnote";
import { organizationImageCache } from "../fetch-github/fetch-issues-full";
import { GitHubIssue } from "../github-types";
import { taskManager } from "../home";
Expand Down Expand Up @@ -170,6 +171,9 @@ export async function viewIssueDetails(full: GitHubIssue) {
bottomBar.prepend(clonedLabels);
}

// Use footnote extension for `marked`
marked.use(markedFootnote());

// Set the issue body content using `marked`
modalBodyInner.innerHTML = marked(full.body) as string;

Expand Down
Loading

0 comments on commit 231c312

Please sign in to comment.