Skip to content

Commit

Permalink
Remove documentation about requiring libraries in rdoc/liquid templates
Browse files Browse the repository at this point in the history
It is better to require tilt/{rdoc,liquid} than the underlying
libraries (especially in the rdoc case), as mentioned in the README.
  • Loading branch information
jeremyevans committed Aug 22, 2024
1 parent a237d86 commit 24e3c01
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 11 deletions.
3 changes: 0 additions & 3 deletions lib/tilt/liquid.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@ module Tilt
# to #to_h it will be ignored.
#
# LiquidTemplate does not support yield blocks.
#
# It's suggested that your program require 'liquid' at load
# time when using this template engine.
class LiquidTemplate < Template
def prepare
@options[:line_numbers] = true unless @options.has_key?(:line_numbers)
Expand Down
8 changes: 0 additions & 8 deletions lib/tilt/rdoc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,6 @@
require 'rdoc/options'

# RDoc template. See: https://github.com/ruby/rdoc
#
# It's suggested that your program run the following at load time when
# using this templae engine in a threaded environment:
#
# require 'rdoc'
# require 'rdoc/markup'
# require 'rdoc/markup/to_html'
# require 'rdoc/options'
Tilt::RDocTemplate = Tilt::StaticTemplate.subclass do
RDoc::Markup::ToHtml.new(RDoc::Options.new, nil).convert(@data).to_s
end

0 comments on commit 24e3c01

Please sign in to comment.