Commit Graph

17 Commits

Author SHA1 Message Date
tdurieux d138d487f2 fix: don't drop a path segment when resolving "./" relative URLs
urlRel2abs() prepended an extra "." when it saw "./X", turning the
relative path into "../X" and silently moving up a directory. As a
result, raw HTML <img src="./imgs/run.png"> inside a README rendered
under /r/<repo>/<file> resolved to /r/<repo>/imgs/... instead of
/r/<repo>/<dir>/imgs/..., so the image 404'd. Markdown image syntax
went through marked-base-url and was unaffected.

Strip the leading "./" instead so the relative path concatenates
cleanly with baseUrl.

Fixes #346.
2026-05-03 20:01:33 +02:00
tdurieux 9feeab1055 fix: render heading IDs so anchor links resolve
marked v12 dropped the headerIds option, so headings rendered with no
id attributes and links like [Releases](#releases-and-contributing)
silently failed to scroll. Add a heading renderer that emits a
GitHub-style slug id, with a numeric suffix for duplicates within a
document.

Fixes #390.
2026-05-03 19:44:18 +02:00
tdurieux a5f66d6844 multiple fixes 2026-05-03 15:30:54 +02:00
Thomas Durieux 2621dfd7fc (feat): added mermaid rendering support in markdown (#676) 2026-04-15 09:56:35 +02:00
Thomas Durieux 812f8b6314 Sanitize markdown HTML output with DOMPurify to prevent XSS (#658) 2026-04-15 04:22:38 +02:00
tdurieux b4ff27f560 fix: improve katex support 2024-04-11 21:38:42 +01:00
tdurieux f30110c567 fix: improve link rendering 2024-04-05 11:04:29 +01:00
tdurieux 7ed973ccfc fix: fix code rendering 2024-04-05 10:17:47 +01:00
tdurieux 22a28a913d perf: improve page loading time 2024-04-05 01:02:41 +01:00
tdurieux f5ec343a9c fix(#263): render math expression correctly 2024-04-04 18:08:03 +01:00
tdurieux dde7fa2d72 feat(#204): display videos in md 2023-05-02 18:21:47 +02:00
tdurieux 8ac3a66a30 feat(#169): add emoji support for markdown 2023-04-21 13:23:34 +02:00
tdurieux 3627096e63 feat(#148): add support for Math expression 2023-04-21 12:29:19 +02:00
Thomas Durieux 73e46f926f feat: add support for pull requests (#156) 2023-01-22 12:54:14 +01:00
tdurieux 8daee004b1 fix: fix relative to abs url 2021-09-09 00:32:03 +02:00
tdurieux 46c27036b8 feat: add support for .git url 2021-09-07 07:13:08 +02:00
tdurieux 80678c51a8 refactor app.js 2021-08-24 12:13:52 +02:00