From e735472d1f22fca2e2103b6d3868c101c54a2e2d Mon Sep 17 00:00:00 2001 From: dave Date: Sun, 7 Dec 2003 02:54:38 +0000 Subject: [PATCH] Support inline source in Kilmer template git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5129 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/rdoc/generators/html_generator.rb | 3 +++ lib/rdoc/generators/template/html/kilmer.rb | 18 ++++++++++++++++++ 2 files changed, 21 insertions(+) diff --git a/lib/rdoc/generators/html_generator.rb b/lib/rdoc/generators/html_generator.rb index 36e2f351da..89349f4b00 100644 --- a/lib/rdoc/generators/html_generator.rb +++ b/lib/rdoc/generators/html_generator.rb @@ -1227,6 +1227,9 @@ module Generators 'title' => CGI.escapeHTML(@options.title), 'charset' => @options.charset } + if @options.inline_source + values['inline_source'] = true + end template.write_html_on(f, values) end end diff --git a/lib/rdoc/generators/template/html/kilmer.rb b/lib/rdoc/generators/template/html/kilmer.rb index 27fde1d29f..7326fb09ac 100644 --- a/lib/rdoc/generators/template/html/kilmer.rb +++ b/lib/rdoc/generators/template/html/kilmer.rb @@ -272,6 +272,19 @@ IF:m_desc %m_desc% ENDIF:m_desc +IF:aka +
+This method is also aliased as +START:aka +%name% +END:aka +
+ENDIF:aka +IF:sourcecode +
+%sourcecode%
+
+ENDIF:sourcecode END:methods ENDIF:methods END:method_list @@ -369,10 +382,15 @@ INDEX = %{ +IF:inline_source + +ENDIF:inline_source +IFNOT:inline_source +ENDIF:inline_source <body bgcolor="white"> Click <a href="html/index.html">here</a> for a non-frames