« get me outta code hell

more sticky heading adjustments - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-12-07 07:30:48 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-12-07 07:30:48 -0400
commitf18ddd61d7430f82116b7f6003e68a548f39f766 (patch)
treea424f5145b759b765eff22498019a5b16e79272a /src/upd8.js
parent0735a45e0ddf693e35202c7c3ef3c15886139843 (diff)
more sticky heading adjustments
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/upd8.js b/src/upd8.js
index bc574c62..f7abdcb8 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -562,6 +562,11 @@ function transformMultiline(text, {parseAttributes, transformInline}) {
       ) {
         lineTag = '';
       }
+
+      // for sticky headings!
+      if (elementMatch) {
+        lineContent = lineContent.replace(/<h2/, `<h2 class="content-heading"`)
+      }
     }
 
     let pushString = indentString.repeat(indentThisLine);