From d1b50598c6ba7f0ca61bb0ea5e4ff9c66c226b4e Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 19 Jul 2026 15:47:52 -1000 Subject: Keep line structure in plaintext readmes --- assets/cgit.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'assets/cgit.js') diff --git a/assets/cgit.js b/assets/cgit.js index 4e0ac70..347e977 100644 --- a/assets/cgit.js +++ b/assets/cgit.js @@ -300,6 +300,9 @@ document.addEventListener("DOMContentLoaded", function () { continue; try { el.innerHTML = render(text); + /* The attribute doubles as the style hook for the + * unrendered source, so drop it once rendered. */ + el.removeAttribute("data-markdown"); } catch (e) { /* leave the escaped source in place on any failure */ } -- cgit v2.8.0