From 578cb33b4ff40a6395f48f964e672e19e3b35190 Mon Sep 17 00:00:00 2001 From: Vedang Manerikar Date: Tue, 14 May 2024 12:17:18 +0530 Subject: [PATCH] org-gfm-toc: Wrap the TOC in a div for styling --- ox-gfm.el | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ox-gfm.el b/ox-gfm.el index 84665cb..6d50487 100644 --- a/ox-gfm.el +++ b/ox-gfm.el @@ -266,8 +266,14 @@ holding export options." (org-gfm-format-toc headline info)) headlines "\n") "")) - (toc-tail (if headlines "\n\n" ""))) - (org-trim (concat toc-string toc-tail contents "\n" (org-gfm-footnote-section info))))) + (toc-head (if headlines "
\n" "")) + (toc-tail (if headlines "\n
\n\n" ""))) + (org-trim (concat toc-head + toc-string + toc-tail + contents + "\n" + (org-gfm-footnote-section info))))) ;;; Interactive function