diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..ac8f968
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,20 @@
+# Compiled source #
+###################
+*.com
+*.class
+*.dll
+*.exe
+*.o
+*.so
+*.pyc
+
+# Logs and databases #
+######################
+*.log
+
+# OS generated files #
+######################
+.DS_Store*
+ehthumbs.db
+Icon?
+Thumbs.db
diff --git a/README b/README
index 6146e55..603fef9 100644
--- a/README
+++ b/README
@@ -7,7 +7,7 @@ This template creates a javascript enhanced rdoc (similar to what is on http://w
1) Get the files (pick your flavor)
* tarball: http://github.com/breakpointer/ajax-rdoc/tarball/master)
* git: git clone git://github.com/breakpointer/ajax-rdoc.git
-
+
2) cd into the new ajax-rdoc directory
3) Install the generator and templates into your version of rdoc
diff --git a/rdoc/generators/ajax_generator.rb b/rdoc/generators/ajax_generator.rb
index cdf88a6..820481d 100644
--- a/rdoc/generators/ajax_generator.rb
+++ b/rdoc/generators/ajax_generator.rb
@@ -10,8 +10,8 @@
# [classes] an html file for each class or module encountered.
# These classes are not grouped by file: if a file
# contains four classes, we'll generate an html
-# file for the file itself, and four html files
-# for the individual classes.
+# file for the file itself, and four html files
+# for the individual classes.
#
# Method descriptions appear in whatever entity (file, class,
# or module) that contains them.
@@ -49,10 +49,10 @@ module Generators
##
# Build a hash of all items that can be cross-referenced.
- # This is used when we output required and included names:
+ # This is used when we output required and included names:
# if the names appear in this hash, we can generate
# an html cross reference to the appropriate description.
- # We also use this when parsing comment blocks: any decorated
+ # We also use this when parsing comment blocks: any decorated
# words matching an entry in this list are hyperlinked.
class AllReferences
@@ -171,7 +171,7 @@ def handle_special_HYPERLINK(special)
def handle_special_TIDYLINK(special)
text = special.text
# unless text =~ /(\S+)\[(.*?)\]/
- unless text =~ /\{(.*?)\}\[(.*?)\]/ or text =~ /(\S+)\[(.*?)\]/
+ unless text =~ /\{(.*?)\}\[(.*?)\]/ or text =~ /(\S+)\[(.*?)\]/
return text
end
label = $1
@@ -203,7 +203,7 @@ def markup(str, remove_para=false)
@markup.add_special(/(
\b([A-Z]\w*(::\w+)*[.\#]\w+) # A::B.meth
| \b([A-Z]\w+(::\w+)*) # A::B..
- | \#\w+[!?=]? # #meth_name
+ | \#\w+[!?=]? # #meth_name
| \b\w+([_\/\.]+\w+)+[!?=]? # meth_name
)/x, :CROSSREF)
@@ -238,7 +238,7 @@ def markup(str, remove_para=false)
def style_url(path, css_name=nil)
- css_name ||= CSS_NAME
+ css_name ||= CSS_NAME
end
# Build a webcvs URL with the given 'url' argument. URLs with a '%s' in them
@@ -260,7 +260,7 @@ def cvs_url(url, full_path)
# A Context is built by the parser to represent a container: contexts
# hold classes, modules, methods, require lists and include lists.
# ClassModule and TopLevel are the context objects we process here
- #
+ #
class ContextUser
include MarkUp
@@ -360,12 +360,12 @@ def build_include_list(context)
def potentially_referenced_list(array)
res = []
array.each do |i|
- ref = AllReferences[i.name]
+ ref = AllReferences[i.name]
# if !ref
# container = @context.parent
# while !ref && container
# name = container.name + "::" + i.name
- # ref = AllReferences[name]
+ # ref = AllReferences[name]
# container = container.parent
# end
# end
@@ -400,12 +400,12 @@ def build_method_detail_list(section)
methods = @methods.sort
for singleton in [true, false]
- for vis in [ :public, :protected, :private ]
+ for vis in [ :public, :protected, :private ]
res = []
methods.each do |m|
if m.section == section and
- m.document_self and
- m.visibility == vis and
+ m.document_self and
+ m.visibility == vis and
m.singleton == singleton
row = {}
if m.call_seq
@@ -428,7 +428,7 @@ def build_method_detail_list(section)
'name' => other.name,
'href' => other.viewer.path,
'aref' => other.viewer.aref
- }
+ }
end
end
unless alias_names.empty?
@@ -448,7 +448,7 @@ def build_method_detail_list(section)
res << row
end
end
- if res.size > 0
+ if res.size > 0
outer << {
"type" => vis.to_s.capitalize,
"category" => singleton ? "Class" : "Instance",
@@ -461,7 +461,7 @@ def build_method_detail_list(section)
end
# Build the structured list of classes and modules contained
- # in this context.
+ # in this context.
def build_class_list(level, from, section, infile=nil)
res = ""
@@ -471,7 +471,7 @@ def build_class_list(level, from, section, infile=nil)
next unless mod.section == section
next if infile && !mod.defined_in?(infile)
if mod.document_self
- res <<
+ res <<
prefix <<
"Module " <<
href(mod.viewer.path, "link", mod.full_name) <<
@@ -485,7 +485,7 @@ def build_class_list(level, from, section, infile=nil)
next if infile && !cls.defined_in?(infile)
if cls.document_self
res <<
- prefix <<
+ prefix <<
"Class " <<
href(cls.viewer.path, "link", cls.full_name) <<
"
\n" <<
@@ -587,7 +587,7 @@ def scope
a.pop
a.join("::")
else
- ""
+ ""
end
end
@@ -663,8 +663,8 @@ def build_attribute_list(section)
next unless att.section == section
if att.visibility == :public || att.visibility == :protected || @options.show_all
entry = {
- "name" => CGI.escapeHTML(att.name),
- "rw" => att.rw,
+ "name" => CGI.escapeHTML(att.name),
+ "rw" => att.rw,
"a_desc" => markup(att.comment, true)
}
unless att.visibility == :public || att.visibility == :protected
@@ -796,7 +796,7 @@ def parent_name
def full_file_source
ret_str = ""
- File.open(@source_file_path, 'r') do |f|
+ File.open(@source_file_path, 'r') do |f|
while(!f.eof?) do
ret_str += f.readline()
end
@@ -1081,7 +1081,7 @@ def markup_code(tokens)
end
# we rely on the fact that the first line of a source code
- # listing has
+ # listing has
# # File xxxxx, line dddd
def add_line_numbers(src)
@@ -1092,7 +1092,7 @@ def add_line_numbers(src)
real_fmt = "%#{size}d: "
fmt = " " * (size+2)
src.gsub!(/^/) do
- res = sprintf(fmt, first)
+ res = sprintf(fmt, first)
first += 1
fmt = real_fmt
res
@@ -1151,7 +1151,7 @@ def initialize(options) #:not-new:
##
# Build the initial indices and output objects
# based on an array of TopLevel objects containing
- # the extracted information.
+ # the extracted information.
def generate(toplevels)
@toplevels = toplevels
@@ -1194,20 +1194,20 @@ def write_style_sheet
template.write_html_on(f, values)
end
end
-
+
def write_javascript
#Argh... I couldn't figure out how to copy these from the template dir so they were copied into
# the template file "ajax.rb" and processed similarlly to the style sheets. Not exactly a good thing to do with
# external library code. Not very DRY.
-
+
File.open("api_grease.js", "w") do |f|
f << RDoc::Page::API_GREASE_JS
end
-
+
File.open("prototype.js", "w") do |f|
f << RDoc::Page::PROTOTYPE_JS
end
-
+
rescue LoadError
$stderr.puts "Could not find AJAX template"
exit 99
@@ -1219,7 +1219,7 @@ def write_javascript
def gen_sub_directories
File.makedirs(FILE_DIR, CLASS_DIR)
- rescue
+ rescue
$stderr.puts $!.message
exit 1
end
@@ -1280,8 +1280,8 @@ def gen_into(list)
end
def gen_file_index
- gen_an_index(@files, 'Files',
- RDoc::Page::FILE_INDEX,
+ gen_an_index(@files, 'Files',
+ RDoc::Page::FILE_INDEX,
"fr_file_index.html")
end
@@ -1292,7 +1292,7 @@ def gen_class_index
end
def gen_method_index
- gen_an_index(HtmlMethod.all_methods, 'Methods',
+ gen_an_index(HtmlMethod.all_methods, 'Methods',
RDoc::Page::METHOD_INDEX,
"fr_method_index.html")
end
@@ -1337,7 +1337,7 @@ def gen_main_index
'title' => CGI.escapeHTML(@options.title),
'charset' => @options.charset
}
-
+
values['inline_source'] = true
template.write_html_on(f, values)
end
diff --git a/rdoc/generators/template/ajax/ajax.rb b/rdoc/generators/template/ajax/ajax.rb
index fb31f9f..6323f03 100644
--- a/rdoc/generators/template/ajax/ajax.rb
+++ b/rdoc/generators/template/ajax/ajax.rb
@@ -1,7 +1,7 @@
module RDoc
module Page
-def self.title
+def self.title
# Get full path of running rdoc dir
pwd = File.expand_path($LOAD_PATH.last)
@@ -46,14 +46,14 @@ def self.title
width: 350px;
background-color: #bbf;
border: 1px solid #999;
-
+
}
#browserBar{
height: 25px;
padding:11px 0px 0px 0px;
margin:0px;
- background-color: #d0d0d0;
+ background-color: #d0d0d0;
border-top: 1px solid #999;
color: #005;
}
@@ -116,7 +116,7 @@ def self.title
padding: 3px;
margin: 0px;
line-height: 1em;
-
+
}
#blowOutListBox ul li a{
@@ -212,7 +212,7 @@ def self.title
.activeA {
background-color: #ffa;
border: 1px solid #ccc;
- padding: 0px 1px 1px 1px;
+ padding: 0px 1px 1px 1px;
}
#listScroller small{
@@ -637,7 +637,7 @@ def self.title
#### This is not used but kept for historical purposes
-########################## Source code ##########################
+########################## Source code ##########################
# Separate page only
SRC_PAGE = <