Permalink
Browse files

Strip extra   out of headings

  • Loading branch information...
stuartsierra committed Aug 14, 2012
1 parent f4966c9 commit c3367a4103f39e14f2891ca7adae7179d8289cd2
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/cljs/org_html_slideshow/main.cljs
@@ -538,6 +538,15 @@
(doseq [elem (dom-tags "div" (str "outline-text-" i))]
(classes/add elem "outline-text"))))
+(defn remove-heading-spaces
+ "Remove extraneous   from org-mode headlines"
+ []
+ (doseq [n (range 1 9)
+ elem (dom-tags (str "h" n))]
+ (set! (.-innerHTML elem)
+ (.replace (.-innerHTML elem)
+ (js/RegExp. " " "g") ""))))
+
;;; MAIN
@@ -551,6 +560,7 @@
(add-image-classes)
(copy-heading-tags-to-div-classes)
(add-outline-text-class)
+ (remove-heading-spaces)
(install-folds)
(. (body-elem)
(appendChild (dom/htmlToDocumentFragment current-slide-div-html)))

0 comments on commit c3367a4

Please sign in to comment.