File: chapter.erb

package info (click to toggle)
libneedle-ruby 1.2.0-2
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,436 kB
  • ctags: 886
  • sloc: ruby: 4,464; makefile: 52
file content (18 lines) | stat: -rw-r--r-- 345 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<h1><%= object.index %>. <%= object.title %></h1>

<% object.sections.each do |section|

   if section.title %>

     <h2>
       <a name="s<%= section.index %>"></a>
       <%= object.index %>.<%= section.index %>. <%= section.title %>
     </h2>

   <% end %>

   <div class="section">
     <%= section.content.to_html %>
   </div>

<% end %>