diff --git a/spec/components/page_content_spec.cr b/spec/components/page_content_spec.cr index fdb07bb..4d1d3c7 100644 --- a/spec/components/page_content_spec.cr +++ b/spec/components/page_content_spec.cr @@ -90,7 +90,7 @@ describe PageContent do it "renders a figure and figure caption" do page = Page.new(nodes: [ Figure.new(children: [ - Image.new(src: "image.png", originalWidth: 100, originalHeight: 100), + Image.new(src: "image.png", originalWidth: 100, originalHeight: 200), FigureCaption.new(children: [ Text.new("A caption"), ] of Child), @@ -101,7 +101,7 @@ describe PageContent do html.should eq stripped_html <<-HTML
- +
A caption
HTML @@ -134,7 +134,7 @@ describe PageContent do it "renders an image" do page = Page.new(nodes: [ Paragraph.new(children: [ - Image.new(src: "image.png", originalWidth: 100, originalHeight: 100), + Image.new(src: "image.png", originalWidth: 100, originalHeight: 200), ] of Child), ] of Child) @@ -142,7 +142,7 @@ describe PageContent do html.should eq stripped_html <<-HTML

- +

HTML end diff --git a/src/components/page_content.cr b/src/components/page_content.cr index 9ccf7cd..55dda5f 100644 --- a/src/components/page_content.cr +++ b/src/components/page_content.cr @@ -63,7 +63,7 @@ class PageContent < BaseComponent end def render_child(child : Image) - img src: child.src, width: child.width, height: child.height + img src: child.src, width: child.width end def render_child(node : ListItem)