From 00db120fc87358a55c448ee88ccff7dbb410009e Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 22 Jun 2010 22:44:43 +0800 Subject: [PATCH] docs.js --- docs.js | 45 ++++++++++++++++++++++++--------------------- 1 file changed, 24 insertions(+), 21 deletions(-) diff --git a/docs.js b/docs.js index 7705aee..82aea6e 100644 --- a/docs.js +++ b/docs.js @@ -129,32 +129,35 @@ var html_file_path = ''; var html = '' // output cross reference data.. - -for (var i in Introspect.references) { - html_file_path = File.join(outputdir, i + '.html'); - - if (i == 'undefined') { - console.log("Undefined name space - ignored"); - continue; - } - if (!File.isFile(html_file_path)) { - console.log("No HTML file " + html_file_path + " to insert references into - ignored"); - continue; - } +langs.forEach(function(lang) { - refs = reference_template.process(Introspect.references[i]); - - // HTML to put refs into - html = File.read(html_file_path); + for (var i in Introspect.references) { + + html_file_path = [ outputdir, lang.name, i + '.html'].join('/'); + + if (i == 'undefined') { + console.log("Undefined name space - ignored"); + continue; + } + + if (!File.isFile(html_file_path)) { + console.log("No HTML file " + html_file_path + " to insert references into - ignored"); + continue; + } + + refs = langs.reference_template.process(Introspect.references[i]); - // do the replacement - html = html.replace(/\