aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v0/dal_idx.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v0/dal_idx.rb')
-rw-r--r--lib/sisu/v0/dal_idx.rb7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/sisu/v0/dal_idx.rb b/lib/sisu/v0/dal_idx.rb
index c2bba846..d7d5223e 100644
--- a/lib/sisu/v0/dal_idx.rb
+++ b/lib/sisu/v0/dal_idx.rb
@@ -181,8 +181,11 @@ module SiSU_book_index
f=/^(\S)/.match(x)[1]
if letter < f
while letter < f
- letter=alph.shift
- @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ if alph.length > 0
+ letter=alph.shift
+ @idx[:html] << %{\n<hr />\n<p class="book_index_lev1"><a name="#{letter}">#{letter}</a></p>}
+ else break
+ end
end
end
@idx[:sst] << %{\n\n#{Mx[:fa_bold_o]}#{x},#{Mx[:fa_bold_c]} }