From 130b235a6c409745dbca8fec7dc3089e02f56138 Mon Sep 17 00:00:00 2001 From: Edward Loveall Date: Sun, 8 Aug 2021 14:23:38 -0400 Subject: [PATCH] crystal tool format --- spec/classes/markup_converter_spec.cr | 2 +- spec/classes/paragraph_converter_spec.cr | 2 +- spec/components/page_content_spec.cr | 28 ++++++++++++------------ src/classes/paragraph_converter.cr | 2 +- src/models/nodes.cr | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) diff --git a/spec/classes/markup_converter_spec.cr b/spec/classes/markup_converter_spec.cr index 8f5ed09..f034a99 100644 --- a/spec/classes/markup_converter_spec.cr +++ b/spec/classes/markup_converter_spec.cr @@ -126,7 +126,7 @@ describe MarkupConverter do result.should eq([ Text.new("I am a "), - Anchor.new(text: "Link", href: "https://example.com") + Anchor.new(text: "Link", href: "https://example.com"), ]) end diff --git a/spec/classes/paragraph_converter_spec.cr b/spec/classes/paragraph_converter_spec.cr index d53fd18..0591690 100644 --- a/spec/classes/paragraph_converter_spec.cr +++ b/spec/classes/paragraph_converter_spec.cr @@ -60,7 +60,7 @@ describe ParagraphConverter do Paragraph.new(children: [ Text.new(content: "inline "), Code.new(children: [Text.new(content: "code")] of Child), - ] of Child) + ] of Child), ] result = ParagraphConverter.new.convert(paragraphs) diff --git a/spec/components/page_content_spec.cr b/spec/components/page_content_spec.cr index f9c537f..32195f9 100644 --- a/spec/components/page_content_spec.cr +++ b/spec/components/page_content_spec.cr @@ -7,7 +7,7 @@ describe PageContent do page = Page.new(nodes: [ Paragraph.new(children: [ Text.new(content: "hi"), - ] of Child) + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string @@ -20,17 +20,17 @@ describe PageContent do Paragraph.new(children: [ Text.new(content: "Hello, "), Emphasis.new(children: [ - Text.new(content: "World!") - ] of Child) + Text.new(content: "World!"), + ] of Child), ] of Child), UnorderedList.new(children: [ ListItem.new(children: [ - Text.new(content: "List!") + Text.new(content: "List!"), ] of Child), ListItem.new(children: [ Text.new(content: "Again!"), - ] of Child) - ] of Child) + ] of Child), + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string @@ -51,8 +51,8 @@ describe PageContent do it "renders a blockquote" do page = Page.new(nodes: [ BlockQuote.new(children: [ - Text.new("Wayne Gretzky. Michael Scott.") - ] of Child) + Text.new("Wayne Gretzky. Michael Scott."), + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string @@ -63,8 +63,8 @@ describe PageContent do it "renders code" do page = Page.new(nodes: [ Code.new(children: [ - Text.new("foo = bar") - ] of Child) + Text.new("foo = bar"), + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string @@ -77,7 +77,7 @@ describe PageContent do Paragraph.new(children: [ Text.new(content: "This is "), Emphasis.new(children: [ - Text.new(content: "neat!") + Text.new(content: "neat!"), ] of Child), ] of Child), ] of Child) @@ -92,7 +92,7 @@ describe PageContent do Figure.new(children: [ Image.new(src: "image.png", originalWidth: 100, originalHeight: 100), FigureCaption.new(children: [ - Text.new("A caption") + Text.new("A caption"), ] of Child), ] of Child), ] of Child) @@ -135,7 +135,7 @@ describe PageContent do page = Page.new(nodes: [ Paragraph.new(children: [ Image.new(src: "image.png", originalWidth: 100, originalHeight: 100), - ] of Child) + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string @@ -151,7 +151,7 @@ describe PageContent do page = Page.new(nodes: [ Paragraph.new(children: [ IFrame.new(href: "https://example.com"), - ] of Child) + ] of Child), ] of Child) html = PageContent.new(page: page).render_to_string diff --git a/src/classes/paragraph_converter.cr b/src/classes/paragraph_converter.cr index 278702c..52001f9 100644 --- a/src/classes/paragraph_converter.cr +++ b/src/classes/paragraph_converter.cr @@ -82,7 +82,7 @@ class ParagraphConverter originalWidth: metadata.originalWidth, originalHeight: metadata.originalHeight ), - FigureCaption.new(children: caption_markup) + FigureCaption.new(children: caption_markup), ] of Child) else Empty.new diff --git a/src/models/nodes.cr b/src/models/nodes.cr index 9241e00..cf699e6 100644 --- a/src/models/nodes.cr +++ b/src/models/nodes.cr @@ -80,7 +80,7 @@ module Nodes class Image IMAGE_HOST = "https://cdn-images-1.medium.com/fit/c" - MAX_WIDTH = 800 + MAX_WIDTH = 800 getter originalHeight : Int32 getter originalWidth : Int32