diff --git a/src/classes/markup_converter.cr b/src/classes/markup_converter.cr index 5a47460..dbbe6a4 100644 --- a/src/classes/markup_converter.cr +++ b/src/classes/markup_converter.cr @@ -12,11 +12,12 @@ class MarkupConverter getter markups : Array(PostResponse::Markup) getter text : String - def self.convert(text : String, markups : Array(PostResponse::Markup)) + def self.convert(text : String?, markups : Array(PostResponse::Markup)) new(text, markups).convert end - def initialize(@text : String, @markups : Array(PostResponse::Markup)) + def initialize(text : String?, @markups : Array(PostResponse::Markup)) + @text = text || "" end def convert : Array(Child) diff --git a/src/models/post_response.cr b/src/models/post_response.cr index 1088d25..bf0c66c 100644 --- a/src/models/post_response.cr +++ b/src/models/post_response.cr @@ -32,7 +32,7 @@ class PostResponse end class Paragraph < Base - property text : String + property text : String? property type : ParagraphType property markups : Array(Markup) property iframe : IFrame?