From 9b214cea896056e7d0a69ae9d3c282e1f027d5b9 Mon Sep 17 00:00:00 2001 From: Xusen Yin Date: Wed, 4 Nov 2015 08:36:55 -0800 Subject: [SPARK-11443] Reserve space lines The trim_codeblock(lines) function in include_example.rb removes some blank lines in the code. Author: Xusen Yin Closes #9400 from yinxusen/SPARK-11443. --- docs/_plugins/include_example.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'docs') diff --git a/docs/_plugins/include_example.rb b/docs/_plugins/include_example.rb index 0f4184c746..6ee63a5ac6 100644 --- a/docs/_plugins/include_example.rb +++ b/docs/_plugins/include_example.rb @@ -50,7 +50,7 @@ module Jekyll .map { |l| l[/\A */].size } .min - lines.map { |l| l[min_start_spaces .. -1] } + lines.map { |l| l.strip.size == 0 ? l : l[min_start_spaces .. -1] } end # Select lines according to labels in code. Currently we use "$example on$" and "$example off$" -- cgit v1.2.3