diff options
author | James Turnbull <james@lovedthanlost.net> | 2010-08-12 15:33:14 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-08-12 15:35:19 +1000 |
commit | 252c9b84f79307e5caa50b50e093ad493993622d (patch) | |
tree | abce1a16ae21d4f9b73ef17d086af39b885e2806 /lib/puppet/application/doc.rb | |
parent | 1157e8dbaf310cca6f56dda3fa9f100b458662ee (diff) | |
download | puppet-252c9b84f79307e5caa50b50e093ad493993622d.tar.gz puppet-252c9b84f79307e5caa50b50e093ad493993622d.tar.xz puppet-252c9b84f79307e5caa50b50e093ad493993622d.zip |
Further RST to Markdown fixes for types, values, tests
Diffstat (limited to 'lib/puppet/application/doc.rb')
-rw-r--r-- | lib/puppet/application/doc.rb | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/lib/puppet/application/doc.rb b/lib/puppet/application/doc.rb index 6ebb47563..1f6c63286 100644 --- a/lib/puppet/application/doc.rb +++ b/lib/puppet/application/doc.rb @@ -56,7 +56,7 @@ class Puppet::Application::Doc < Puppet::Application end def run_command - return[:rdoc, :markdown].include?(options[:mode]) ? send(options[:mode]) : other + return[:rdoc].include?(options[:mode]) ? send(options[:mode]) : other end def rdoc @@ -92,32 +92,6 @@ class Puppet::Application::Doc < Puppet::Application exit exit_code end - def markdown - text = "" - with_contents = false - exit_code = 0 - require 'puppet/util/reference' - options[:references].sort { |a,b| a.to_s <=> b.to_s }.each do |name| - raise "Could not find reference #{name}" unless section = Puppet::Util::Reference.reference(name) - - begin - # Add the per-section text, but with no ToC - text += section.send(options[:format], with_contents) - text += Puppet::Util::Reference.footer - text.gsub!(/`\w+\s+([^`]+)`:trac:/) { |m| $1 } - Puppet::Util::Reference.markdown(name, text) - text = "" - rescue => detail - puts detail.backtrace - $stderr.puts "Could not generate reference #{name}: #{detail}" - exit_code = 1 - next - end - end - - exit exit_code - end - def other text = "" with_contents = options[:references].length <= 1 |