Skip to content

Commit

Permalink
Bugfix: Space after book for books with only one chapter.
Browse files Browse the repository at this point in the history
  • Loading branch information
janfri committed Apr 15, 2016
1 parent c641c52 commit 4b763aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion lib/scripref/formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ def process_b1
def process_c1
c1 = @pass.c1
if c1 && (@changed || @last_c != c1)
@result << ' '
if ! book_has_only_one_chapter?(@pass.b1)
@result << ' '
@result << c1.to_s
end
@last_c = c1
Expand All @@ -63,6 +63,8 @@ def process_v1
if v1 && (@changed || @last_v != v1)
if ! book_has_only_one_chapter?(@pass.b1)
@result << cv_separator
else
@result << ' '
end
@result << v1.to_s
@last_v = v1
Expand Down
1 change: 0 additions & 1 deletion test/test_formatter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ def test_book_with_only_one_chapter_range
end

def test_book_with_only_one_chapter_at_begin_of_range
omit "Doesn't work yet."
text = 'Obadja-Jona'
assert_formated_text_for_ast text, [pass(text, 31, 1, nil, 32, nil, nil)]
text = 'Obadja 3-Jona 2,4'
Expand Down

0 comments on commit 4b763aa

Please sign in to comment.