diff --git a/lib/gollum/frontend/app.rb b/lib/gollum/frontend/app.rb index 84c6c515..06bf6798 100644 --- a/lib/gollum/frontend/app.rb +++ b/lib/gollum/frontend/app.rb @@ -6,7 +6,7 @@ require 'mustache/sinatra' require 'gollum/frontend/views/layout' require 'gollum/frontend/views/editable' -require 'extensions/toc' +require 'toc' module Precious class App < Sinatra::Base @@ -116,7 +116,7 @@ module Precious @content = @page.formatted_data do |doc| # Insert anchors for table of contents - toc = Gollum::Extensions::Toc_gen.new doc + toc = Gollum::Toc_gen.new doc if (toc_content = toc.generate) toc.insert_anchors @toc_content = toc_content.to_xhtml(:save_with => Nokogiri::XML::Node::SaveOptions::AS_XHTML) @@ -211,7 +211,7 @@ module Precious @content = page.formatted_data do |doc| # Insert anchors for table of contents - toc = Gollum::Extensions::Toc_gen.new doc + toc = Gollum::Toc_gen.new doc if (toc_content = toc.generate) toc.insert_anchors @toc_content = toc_content.to_xhtml(:save_with => Nokogiri::XML::Node::SaveOptions::AS_XHTML) diff --git a/lib/extensions/toc.rb b/lib/gollum/toc.rb similarity index 99% rename from lib/extensions/toc.rb rename to lib/gollum/toc.rb index 00de2670..e0c3dfa8 100644 --- a/lib/extensions/toc.rb +++ b/lib/gollum/toc.rb @@ -1,4 +1,4 @@ -module Gollum::Extensions +module Gollum class Toc_gen attr_accessor :header_tags @@ -130,4 +130,4 @@ module Gollum::Extensions @lvls[lvl_dst] end end -end \ No newline at end of file +end