mirror of
https://git.sr.ht/~edwardloveall/scribe
synced 2025-12-10 20:51:25 +00:00
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:
@@ -81,7 +81,7 @@ describe PageContent do
|
||||
|
||||
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
|
||||
|
||||
it "renders code" do
|
||||
|
||||
@@ -17,7 +17,9 @@ class PageContent < BaseComponent
|
||||
end
|
||||
|
||||
def render_child(node : BlockQuote)
|
||||
blockquote { render_children(node.children) }
|
||||
blockquote do
|
||||
para { render_children(node.children) }
|
||||
end
|
||||
end
|
||||
|
||||
def render_child(node : Code)
|
||||
|
||||
Reference in New Issue
Block a user