Add PQ (pullquote) type

This appears for something like medium's "top highlight". It's like a
blockquote but bigger
This commit is contained in:
Edward Loveall 2021-08-08 18:17:46 -04:00
parent e64e9f0853
commit bf43c7f467
No known key found for this signature in database
GPG key ID: 789A4AE983AC8901
3 changed files with 16 additions and 1 deletions

View file

@ -244,6 +244,15 @@ describe ParagraphConverter do
"layout": null,
"metadata": null
},
{
"text": "text",
"type": "PQ",
"markups": [],
"href": null,
"iframe": null,
"layout": null,
"metadata": null
},
{
"text": "text",
"type": "ULI",
@ -295,7 +304,8 @@ describe ParagraphConverter do
Heading4.new([Text.new("text")] of Child),
Paragraph.new([Text.new("text")] of Child),
Preformatted.new([Text.new("text")] of Child),
BlockQuote.new([Text.new("text")] of Child),
BlockQuote.new([Text.new("text")] of Child), # BQ
BlockQuote.new([Text.new("text")] of Child), # PQ
UnorderedList.new([ListItem.new([Text.new("text")] of Child)] of Child),
OrderedList.new([ListItem.new([Text.new("text")] of Child)] of Child),
Figure.new(children: [

View file

@ -35,6 +35,10 @@ class ParagraphConverter
paragraph = paragraphs.shift
children = MarkupConverter.convert(paragraph.text, paragraph.markups)
node = Paragraph.new(children: children)
when PostResponse::ParagraphType::PQ
paragraph = paragraphs.shift
children = MarkupConverter.convert(paragraph.text, paragraph.markups)
node = BlockQuote.new(children: children)
when PostResponse::ParagraphType::PRE
paragraph = paragraphs.shift
children = MarkupConverter.convert(paragraph.text, paragraph.markups)

View file

@ -47,6 +47,7 @@ class PostResponse
IMG
OLI
P
PQ
PRE
ULI
end