Clean up feeds JSON

This commit is contained in:
2024-03-25 08:39:59 +11:00
parent 2b1363294b
commit 58944c6cf3

View File

@@ -146,10 +146,12 @@ module Main
end
def to_h
clean_content = CGI::unescapeHTML(content.gsub(/<\/?[^>]*>/, "")).strip
clean_content = clean_content.gsub(prefix_emoji[0], "") if prefix_emoji
{
id: slug,
emoji: prefix_emoji,
content: raw_content,
content: clean_content,
images: (inline_image_sources + photo_sources).compact
}
end