diff options
author | Xusen Yin <yinxusen@gmail.com> | 2015-11-04 08:36:55 -0800 |
---|---|---|
committer | Xiangrui Meng <meng@databricks.com> | 2015-11-04 08:36:55 -0800 |
commit | 9b214cea896056e7d0a69ae9d3c282e1f027d5b9 (patch) | |
tree | 4bc850a95d5803bb0646e717eb77f3b3d289d9e9 | |
parent | 820064e613609bbf7edd726d982da1de60bf417a (diff) | |
download | spark-9b214cea896056e7d0a69ae9d3c282e1f027d5b9.tar.gz spark-9b214cea896056e7d0a69ae9d3c282e1f027d5b9.tar.bz2 spark-9b214cea896056e7d0a69ae9d3c282e1f027d5b9.zip |
[SPARK-11443] Reserve space lines
The trim_codeblock(lines) function in include_example.rb removes some blank lines in the code.
Author: Xusen Yin <yinxusen@gmail.com>
Closes #9400 from yinxusen/SPARK-11443.
-rw-r--r-- | docs/_plugins/include_example.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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$" |