Implement spacing before/after for paragraphs
All checks were successful
CI Pipeline / build (push) Successful in 47s
All checks were successful
CI Pipeline / build (push) Successful in 47s
This commit is contained in:
@@ -2,8 +2,10 @@
|
||||
|
||||
module Notare
|
||||
module Builder
|
||||
def p(text = nil, style: nil, &block)
|
||||
para = Nodes::Paragraph.new(style: resolve_style(style))
|
||||
def p(text = nil, style: nil, spacing_before: nil, spacing_after: nil, &block)
|
||||
para = Nodes::Paragraph.new(style: resolve_style(style),
|
||||
spacing_before: spacing_before,
|
||||
spacing_after: spacing_after)
|
||||
if block
|
||||
with_target(para, &block)
|
||||
elsif text
|
||||
|
||||
Reference in New Issue
Block a user