Fix Blockquotes

In tufte.css blockquotes should contain a <p> that holds the content
and an optional <footer> for the source of the quote. Otherwise the
block quote text is unbounded and is way too wide. This wraps the
content in a paragraph
This commit is contained in:
Edward Loveall 2021-09-15 15:25:34 -04:00
parent a6cafaa1fc
commit 1c20c81d06
No known key found for this signature in database
GPG key ID: 789A4AE983AC8901
2 changed files with 4 additions and 2 deletions

View file

@ -81,7 +81,7 @@ describe PageContent do
html = PageContent.new(page: page).render_to_string html = PageContent.new(page: page).render_to_string
html.should eq %(<blockquote>Wayne Gretzky. Michael Scott.</blockquote>) html.should eq %(<blockquote><p>Wayne Gretzky. Michael Scott.</p></blockquote>)
end end
it "renders code" do it "renders code" do

View file

@ -17,7 +17,9 @@ class PageContent < BaseComponent
end end
def render_child(node : BlockQuote) def render_child(node : BlockQuote)
blockquote { render_children(node.children) } blockquote do
para { render_children(node.children) }
end
end end
def render_child(node : Code) def render_child(node : Code)