Skip to content

Commit

Permalink
spinneret-tags(:nsection): Add an explanation commentary.
Browse files Browse the repository at this point in the history
  • Loading branch information
aartaka committed Nov 18, 2022
1 parent e81027e commit 3ae2229
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions source/spinneret-tags.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,16 @@ by default"
(remf attrs :level)
(remf attrs :open-p)
(remf attrs :id)
`(let ((spinneret::*html-path* (append
spinneret::*html-path*
(make-list ,(if level
`(1- (- ,level (spinneret::heading-depth)))
0)
:initial-element :section))))
`(let ((spinneret::*html-path*
;; Push as many :section tags into the path, as necessary to imply
;; LEVEL for the sections inside this one. A trick on Spinneret to
;; make it think it's deeply nested already.
(append
spinneret::*html-path*
(make-list ,(if level
`(1- (- ,level (spinneret::heading-depth)))
0)
:initial-element :section))))
(:section
:id ,id
(:details
Expand Down

0 comments on commit 3ae2229

Please sign in to comment.