Add SECTION_CAPTION paragraph type

This doesn't seem to be rendered on medium.com. Here's a post that has
one, but the text is nowhere on the page:
https://medium.com/message/the-joy-of-typing-fd8d091ab8ef

This help articles hints that it might have been a feature at one point
that they don't allow anymore:
https://medium.com/@Medium/images-652ee60abea6
This commit is contained in:
Edward Loveall 2021-10-20 20:39:18 -04:00
parent 513d590ce3
commit 7166b7d834
No known key found for this signature in database
GPG Key ID: 789A4AE983AC8901
2 changed files with 6 additions and 0 deletions

View File

@ -47,6 +47,11 @@ class ParagraphConverter
paragraph = paragraphs.shift
children = MarkupConverter.convert(paragraph.text, paragraph.markups)
node = Preformatted.new(children: children)
when PostResponse::ParagraphType::SECTION_CAPTION
# unused. just here to catch the type instead of implicitly going to the
# else block
paragraph = paragraphs.shift
node = Empty.new
when PostResponse::ParagraphType::ULI
list_items = convert_uli(paragraphs)
node = UnorderedList.new(children: list_items)

View File

@ -52,6 +52,7 @@ class PostResponse
P
PQ
PRE
SECTION_CAPTION
ULI
end