ruricolist/spinneret

pseudotag :h* and section level

admich opened this issue · 1 comments

In the README is written:

At the top level, :H* is equivalent to :H1. Inside the dynamic extent of one :SECTION tag, it is equivalent to :H2;

but I obtain that inside one :SECTION :h* is equivalent to :h1.

I think that the problem is in the function heading-depth in run.lisp file :

(defun heading-depth ()
  "Return the current dynamic heading depth.
This follows the convention for the XHTML <h/> element, where the top
level is level 1, inside the first section is level 2, and so forth."
  (clamp (count :section *html-path*) 1 6))

Maybe is necessary to add 1:

(defun heading-depth ()
  "Return the current dynamic heading depth.
This follows the convention for the XHTML <h/> element, where the top
level is level 1, inside the first section is level 2, and so forth."
  (clamp (1+ (count :section *html-path*)) 1 6))

You're right, this needs fixing. If you would care to make a pull request I will merge it, otherwise I will fix it as soon as I have the chance.