sculpt 0.1.01 → 0.1.02
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/sculpt/sculpture.rb +6 -1
- metadata +1 -1
data/lib/sculpt/sculpture.rb
CHANGED
@@ -25,7 +25,12 @@ class Sculpture < ElementContainer
|
|
25
25
|
|
26
26
|
def p(text='',attrs = {},&block)
|
27
27
|
# necessary to override the Kernel#p method
|
28
|
-
|
28
|
+
if text.kind_of? String
|
29
|
+
txt = text.unindent.lstrip # for multi-line strings
|
30
|
+
else
|
31
|
+
txt = text
|
32
|
+
end
|
33
|
+
add_tag Tag.new(:p, txt, attrs, &block)
|
29
34
|
end
|
30
35
|
|
31
36
|
def puts(text)
|