aboutsummaryrefslogtreecommitdiff
path: root/readers/article.rkt
diff options
context:
space:
mode:
Diffstat (limited to 'readers/article.rkt')
-rw-r--r--readers/article.rkt5
1 files changed, 4 insertions, 1 deletions
diff --git a/readers/article.rkt b/readers/article.rkt
index c60de16..2d14639 100644
--- a/readers/article.rkt
+++ b/readers/article.rkt
@@ -27,6 +27,9 @@
(define hash (hash-ref jse 'hash (thunk (k "hash not found"))))
(unless (string? hash) (k "hash must be a string"))
+ (define source (hash-ref jse 'source (thunk (k "source not found"))))
+ (unless (string? source) (k "source must be a string"))
+
(define title (hash-ref jse 'title (thunk (k "title not found"))))
(unless (string? title) (k "title must be a string"))
@@ -37,7 +40,7 @@
(define body (hash-ref jse 'html (thunk (k "html not found"))))
(unless (string? body) (k "html must be a string"))
- (make-article-with-tags id timestamp hash title body tags))))
+ (make-article-with-tags id timestamp hash source title body tags))))
(: read-article (-> Input-Port (U Article-With-Tags EOF)))
(define (read-article in)