lib/ctioga2/commands/doc/html.rb in ctioga2-0.4 vs lib/ctioga2/commands/doc/html.rb in ctioga2-0.5

- old
+ new

@@ -14,11 +14,11 @@ require 'ctioga2/utils' require 'ctioga2/commands/commands' module CTioga2 - Version::register_svn_info('$Revision: 216 $', '$Date: 2010-12-31 16:18:17 +0100 (Fri, 31 Dec 2010) $') + Version::register_svn_info('$Revision: 409 $', '$Date: 2013-08-22 21:23:51 +0200 (Thu, 22 Aug 2013) $') module Commands module Documentation @@ -167,27 +167,27 @@ def command_documentation(cmd) str = "<h4 class='command' id='command-#{cmd.name}'>Command: <code>#{cmd.name}</code></h4>\n" str << "<p class='synopsis'>\n<span class='bold'>Synopsis (file)</span>\n" str << "</p>\n<pre class='examples-cmdfile'>" - str << "<span class='cmd'>#{cmd.name}(" + str << "<span class='cmd'>#{cmd.name} " str << cmd.arguments.map { |arg| "<a class='argument' href='#{@types_url}#type-#{arg.type.name}'>#{arg.displayed_name}</a>" - }.join(',') + }.join(' ') if cmd.has_options? if(cmd.arguments.size > 0) - str << ", " + str << " " end - str << "option=..." + str << "/option=..." end - str << ")</span>\n" + str << "</span>\n" str << "</pre>\n" # Command-line file synopsis str << "<p class='synopsis'>\n<span class='bold'>Synopsis (command-line)</span>\n" args = cmd.arguments.map { |arg| - "<a class='argument' href='#{@types_url}#type-#{arg.type.name}'>#{arg.displayed_name.upcase}</a>" + "<a class='argument' href='#{@types_url}#type-#{arg.type.name}'>#{arg.displayed_name}</a>" }.join(' ') if cmd.has_options? args << " /option=..." end str << "</p>\n<pre class='examples-cmdline'>" @@ -202,10 +202,10 @@ str << "</pre>" if cmd.has_options? str << "<p class='synopsis'><span class='bold'>Available options</span>:\n" opts = cmd.optional_arguments.sort.map do |k,arg| - "<a href='#{@types_url}#type-#{arg.type.name}'><code>#{k}</code></a>\n" + "<a href='#{@types_url}#type-#{arg.type.name}'><code>#{cmd.normalize_option_name(k)}</code></a>\n" end str << opts.join(' ') str << "</p>" end # Now, the description: