diff options
author | Ludovic Courtès | 2011-09-15 06:30:28 +0200 |
---|---|---|
committer | Ludovic Courtès | 2011-09-15 06:30:28 +0200 |
commit | 38dc7be28dcf696a7fc825011333a5847e2905a9 (patch) | |
tree | ba99beb71de1f1b3658c81096c3ac373f7f70d93 | |
parent | 65f2f4532fb0f04292d8207b801d128fa5e226d1 (diff) | |
download | skribilo-38dc7be28dcf696a7fc825011333a5847e2905a9.tar.gz skribilo-38dc7be28dcf696a7fc825011333a5847e2905a9.tar.lz skribilo-38dc7be28dcf696a7fc825011333a5847e2905a9.zip |
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.
-rwxr-xr-x | src/guile/skribilo/reader/rss-2.scm | 7 |
1 files 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 <ludo@gnu.org> +;;; Copyright 2008, 2011 Ludovic Courtès <ludo@gnu.org> ;;; ;;; ;;; 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") |