From 9290713ad0fd5183923cf592910ceef9a8751573 Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Mon, 16 Mar 2015 14:18:24 +0900 Subject: [PATCH] Cosmetic changes --- lib/hamlit/multiline_preprocessor.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lib/hamlit/multiline_preprocessor.rb b/lib/hamlit/multiline_preprocessor.rb index 560d037c..026e62fc 100644 --- a/lib/hamlit/multiline_preprocessor.rb +++ b/lib/hamlit/multiline_preprocessor.rb @@ -18,15 +18,16 @@ module Hamlit while @lines[@current_lineno + 1] @current_lineno += 1 - if end_with_pipe?(current_line) - prefix = current_line[/\A */] - lines = scan_multilines - - result << prefix + build_multiline(lines) - (lines.length - 1).times { result << '' } - else + unless end_with_pipe?(current_line) result << current_line + next end + + prefix = current_line[/\A */] + lines = scan_multilines + + result << prefix + build_multiline(lines) + (lines.length - 1).times { result << '' } end result.map { |line| "#{line}\n" }.join end