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:
parent
e64e9f0853
commit
bf43c7f467
3 changed files with 16 additions and 1 deletions
|
@ -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: [
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -47,6 +47,7 @@ class PostResponse
|
|||
IMG
|
||||
OLI
|
||||
P
|
||||
PQ
|
||||
PRE
|
||||
ULI
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue