summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2023-03-18 00:01:43 +0200
committerPaul Buetow <paul@buetow.org>2023-03-18 00:01:43 +0200
commitdb6bd852dc8e4ad8c41b9489261df6de6a4fba43 (patch)
treeec59460eb2ba3e230afb596a7e924c596d8df341 /lib
parent8aa5a908fb9199984b8b05f79e49402f4577b706 (diff)
fallback to quote when no summary found
Diffstat (limited to 'lib')
-rw-r--r--lib/atomfeed.source.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/atomfeed.source.sh b/lib/atomfeed.source.sh
index 10ec380..d614fe0 100644
--- a/lib/atomfeed.source.sh
+++ b/lib/atomfeed.source.sh
@@ -108,6 +108,10 @@ atomfeed::_entry () {
# Extract first paragraph from Gemtext as the summary.
local summary=$($SED -n '/^[A-Z]/ { p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'")
+ if [ -z "$summary" ]; then
+ # No summary found, maybe there is only a quote...
+ summary=$($SED -n '/^>/ { s/> *//; p; q; }' "$gemfeed_dir/$gmi_file" | tr '"' "'")
+ fi
assert::not_empty summary "$summary"
# Extract the date from the file name.