Permalink
Browse files

Fix indentation stripping when only one document line.

  • Loading branch information...
trans committed Mar 2, 2012
1 parent 796eaf0 commit c22003e6b9395f1c09b252c94821cedb37eda512
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/tomdoc/tomdoc.rb
View
@@ -106,7 +106,7 @@ def tomdoc
end
# for some reason the first line is coming in without indention
- # regardless.
+ # regardless, so we temporary remove it
first = lines.shift
# remove indention
@@ -116,7 +116,7 @@ def tomdoc
md ? md[1].size : nil
end.compact
- space = spaces.min
+ space = spaces.min || 0
lines = lines.map do |line|
if line.empty?
line.strip

0 comments on commit c22003e

Please sign in to comment.