diff options
author | ng0 <ng0@n0.is> | 2019-11-04 12:48:22 +0000 |
---|---|---|
committer | ng0 <ng0@n0.is> | 2019-11-04 12:48:22 +0000 |
commit | d9c8dc5c2b94e28d6ffa945f0b235fc1a790aa19 (patch) | |
tree | ef709534fad184b920e6a54991666ec9483e894f /rssg | |
parent | d446e32e3520a030fbc3e730a28646b97f62f355 (diff) | |
download | www-d9c8dc5c2b94e28d6ffa945f0b235fc1a790aa19.tar.gz www-d9c8dc5c2b94e28d6ffa945f0b235fc1a790aa19.zip |
get_title: since $description is the content between <!--BEGIN--> and <!--END-->, we only have one h1 result.
Diffstat (limited to 'rssg')
-rwxr-xr-x | rssg | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -81,7 +81,7 @@ md_to_html() { | |||
81 | get_title() { | 81 | get_title() { |
82 | awk -F '[<>]' '/<h1/ { gsub(/<h1>/, ""); gsub(/<\/h1>/, ""); sub(/ .*/, "", $3); print $0}' | | 82 | awk -F '[<>]' '/<h1/ { gsub(/<h1>/, ""); gsub(/<\/h1>/, ""); sub(/ .*/, "", $3); print $0}' | |
83 | sed 's/^[ \t]*//;s/[ \t]*$//' | | 83 | sed 's/^[ \t]*//;s/[ \t]*$//' | |
84 | awk 'FNR==2' | 84 | awk 'FNR==1' |
85 | } | 85 | } |
86 | 86 | ||
87 | 87 | ||