Adds anchor to found heading


/ Published in: Lisp
Save to your folder(s)



Copy this code and paste it in your HTML
  1. ;; returns an anchored content for TOC, if needed
  2. ;; this function also updates the anchor number
  3. (define (get-anchor content level)
  4. (if (> level SETUP:toc-level)
  5. content
  6. (let ( str (append {[TOC]<a name="a} (string TOC:anchor) {" href="#toc">[TOC]} content {[TOC]</a>[TOC]}) )
  7. (++ TOC:anchor)
  8. str)))

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.