167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
|
# File 'lib/markascend/parser.rb', line 167
def parse_paragraph
@src.match?(/\ */)
indent = @src.matched_size
line, block = scan_line_and_block
if line
@out << :"<p>" if @top_level
LineUnit.new(@env, line, block).parse(@out)
while (@src.match?(/\ */); @src.matched_size) == indent and !@src.match?(NON_PARA_START)
line, block = scan_line_and_block
break unless line
LineUnit.new(@env, line, block).parse(@out)
end
@src.scan /\ *\n/
@out.pop if @out.last == :"<br>"
@out << :"</p>" if @top_level
true
end
end
|