From 38dc7be28dcf696a7fc825011333a5847e2905a9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 15 Sep 2011 06:30:28 +0200 Subject: rss-2: Work around an obscure match bug (?). * src/guile/skribilo/reader/rss-2.scm (shtml->skribe): Change the order of the two tr/th/td/tc patterns; otherwise we'd get a match error, leading to a test failure in `rss-2.test'. Problem could not be reproduced outside of this context. --- src/guile/skribilo/reader/rss-2.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/guile/skribilo/reader/rss-2.scm b/src/guile/skribilo/reader/rss-2.scm index aa393b9..8fe56c7 100755 --- a/src/guile/skribilo/reader/rss-2.scm +++ b/src/guile/skribilo/reader/rss-2.scm @@ -1,6 +1,6 @@ ;;; rss-2.scm -- A reader for RSS 2.0 files. ;;; -;;; Copyright 2008 Ludovic Courtès +;;; Copyright 2008, 2011 Ludovic Courtès ;;; ;;; ;;; This program is free software; you can redistribute it and/or modify @@ -208,8 +208,9 @@ (and (pair? x) (loop x))) body))) - ((or ((and (or 'tr 'th 'td 'tc) tag) ('@ _ ...) body ...) - ((and (or 'tr 'th 'td 'tc) tag) body ...)) + ;; XXX: Putting the second pattern first yields to match failures. + ((or ((and (or 'tr 'th 'td 'tc) tag) body ...) + ((and (or 'tr 'th 'td 'tc) tag) ('@ _ ...) body ...)) `(,tag ,@(map loop body))) (('*ENTITY* "additional" "nbsp") -- cgit v1.2.3