Skip to content

Commit

Permalink
fix: allow linking headings in dataset about.md
Browse files Browse the repository at this point in the history
  • Loading branch information
davidlougheed committed Jan 16, 2024
1 parent 94da0db commit 16175f2
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
"lodash": "^4.17.21",
"lodash.clonedeep": "^4.5.0",
"marked": "^11.1.0",
"marked-gfm-heading-id": "^3.1.2",
"md5": "^2.3.0",
"morgan": "^1.10.0",
"mysql": "^2.18.1",
Expand Down
3 changes: 3 additions & 0 deletions routes/dataset.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import fs from "node:fs/promises";
import express from "express";
import {marked} from "marked";
import {gfmHeadingId} from "marked-gfm-heading-id";

import config from "../config.js";
import envConfig from "../envConfig.js";
import {chromosomeSizesByAssemblyID} from "../data/assemblies/index.mjs";
import {dataHandler} from "../helpers/handlers.mjs";

marked.use(gfmHeadingId());

const aboutContent = marked.parse(await fs.readFile(envConfig.ABOUT_MD_PATH, {encoding: "utf-8"}));

export default express.Router().get("", (req, res) => {
Expand Down

0 comments on commit 16175f2

Please sign in to comment.