summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Pelz <pelzflorian@pelzflorian.de>2018-02-11 16:44:49 +0100
committerFlorian Pelz <pelzflorian@pelzflorian.de>2018-02-11 16:44:49 +0100
commitb38f26ce4b824c552fef3940abd509d9727acea8 (patch)
treed4a07aadc8e95b8e0028a1bf9fb6305883a88bb2
parent77e1c30532f0bf834ddc6709c7883c17bb46740f (diff)
Added SXPath for more complex SXML.HEADmaster
As proposed by Ricardo Wurmus here: https://lists.gnu.org/archive/html/guix-devel/2018-02/msg00223.html
-rw-r--r--haunt.scm4
1 files changed, 3 insertions, 1 deletions
diff --git a/haunt.scm b/haunt.scm
index 27acb27..a0a4915 100644
--- a/haunt.scm
+++ b/haunt.scm
@@ -37,6 +37,7 @@
(srfi srfi-26)
(sxml simple)
(sxml transform)
+ ((sxml xpath) #:prefix xpath:)
(haunt asset)
(haunt html)
(haunt page)
@@ -651,7 +652,8 @@ url=\"https://www.gnu.org/software/guile/\">GNU Guile</link> and \
`(link
. ,(lambda (tag attr text)
(a-href
- (cadadr attr)
+ (car ((xpath:sxpath
+ '(url *text*)) attr))
text)))))))))))))))
(define pelzflorian-blue-theme