diff options
Diffstat (limited to 'lib/sisu/v3/epub_format.rb')
-rw-r--r-- | lib/sisu/v3/epub_format.rb | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/sisu/v3/epub_format.rb b/lib/sisu/v3/epub_format.rb index c08ae492..06a6d623 100644 --- a/lib/sisu/v3/epub_format.rb +++ b/lib/sisu/v3/epub_format.rb @@ -1740,9 +1740,9 @@ WOK end end def links_guide_open(type='horizontal') - if type=='vertical'; links_guide_vertical_open - else links_guide_horizontal_open - end + (type=='vertical') \ + ? links_guide_vertical_open + : links_guide_horizontal_open end def prefix_a end @@ -1853,12 +1853,12 @@ WOK if @format and not @format.empty? if @format=~/^\d:(\S+)/ #need more reliable marker #if @format =~ /#{Rx[:lv]}/ headname=$1 #format[/\d~(\S+)/m,1] - @headname=if headname =~/^[a-zA-Z]/; %{<id="#{headname}">} #consider: h_#{headname} - else %{<id="h#{headname}"></a>} - end - @headname=if headname =~/^[a-zA-Z]/; %{<a name="#{headname}" id="#{headname}"></a>} #consider: h_#{headname} - else %{<a name="h#{headname}" id="h#{headname}"></a>} - end + @headname=(headname =~/^[a-zA-Z]/) \ + ? %{<id="#{headname}">} + : %{<id="h#{headname}"></a>} + @headname=(headname =~/^[a-zA-Z]/) \ + ? %{<a name="#{headname}" id="#{headname}"></a>} + : %{<a name="h#{headname}" id="h#{headname}"></a>} end end elsif t_o.class.inspect =~/Object/ |