diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2011-02-01 16:59:23 -0800 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2011-02-01 16:59:23 -0800 |
commit | c677f5bd4bb18ec93b82d8f39f317dd40963c2cc (patch) | |
tree | 0d7d3617762d3076bd080c39a78a1e92568cb839 /lib/puppet/util | |
parent | 9b064e655f90bb5aa2f95e343e9c22765ddf4998 (diff) | |
parent | 66b442b723f1e74b934381227955cc30d64f3636 (diff) | |
download | puppet-c677f5bd4bb18ec93b82d8f39f317dd40963c2cc.tar.gz puppet-c677f5bd4bb18ec93b82d8f39f317dd40963c2cc.tar.xz puppet-c677f5bd4bb18ec93b82d8f39f317dd40963c2cc.zip |
Merge remote branch 'james/tickets/2.6.x/5916' into 2.6.next
Diffstat (limited to 'lib/puppet/util')
-rwxr-xr-x | lib/puppet/util/command_line/puppetdoc | 4 | ||||
-rw-r--r-- | lib/puppet/util/reference.rb | 11 |
2 files changed, 3 insertions, 12 deletions
diff --git a/lib/puppet/util/command_line/puppetdoc b/lib/puppet/util/command_line/puppetdoc index 8f24ea5ef..45a9c6518 100755 --- a/lib/puppet/util/command_line/puppetdoc +++ b/lib/puppet/util/command_line/puppetdoc @@ -37,7 +37,7 @@ # Specifies the directory where to output the rdoc documentation in 'rdoc' mode. # # mode:: -# Determine the output mode. Valid modes are 'text', 'trac', 'pdf' and 'rdoc'. The 'pdf' mode creates PDF formatted files in the /tmp directory. The default mode is 'text'. In 'rdoc' mode you must provide 'manifests-path' +# Determine the output mode. Valid modes are 'text', 'pdf' and 'rdoc'. The 'pdf' mode creates PDF formatted files in the /tmp directory. The default mode is 'text'. In 'rdoc' mode you must provide 'manifests-path' # # reference:: # Build a particular reference. Get a list of references by running +puppet doc --list+. @@ -47,7 +47,7 @@ # # = Example # -# $ puppet doc -r type > /tmp/type_reference.rst +# $ puppet doc -r type > /tmp/type_reference.markdown # or # $ puppet doc --outputdir /tmp/rdoc --mode rdoc /path/to/manifests # or diff --git a/lib/puppet/util/reference.rb b/lib/puppet/util/reference.rb index 95efeb1c1..a4921ed2a 100644 --- a/lib/puppet/util/reference.rb +++ b/lib/puppet/util/reference.rb @@ -120,16 +120,11 @@ class Puppet::Util::Reference str += "\n\n" end - # Remove all trac links. - def strip_trac(text) - text.gsub(/`\w+\s+([^`]+)`:trac:/) { |m| $1 } - end - def text puts output end - def to_rest(withcontents = true) + def to_markdown(withcontents = true) # First the header text = h(@title, 1) text += "\n\n**This page is autogenerated; any changes will get overwritten** *(last generated on #{Time.now.to_s})*\n\n" @@ -142,8 +137,4 @@ class Puppet::Util::Reference text end - - def to_text(withcontents = true) - strip_trac(to_rest(withcontents)) - end end |