X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=docs.js;h=386f14dbd8a0a1e6c69d979df7d086284b16ecd3;hb=d1e403ae3b87c1700584bb0cbadca2048b80351c;hp=d1299e58d629a7cc4b3bd4635c019bd1a7e8ef9e;hpb=e63d406c8f6ddcfbd20d53c36ac5a2735a0bf597;p=gnome.introspection-doc-generator diff --git a/docs.js b/docs.js index d1299e5..386f14d 100644 --- a/docs.js +++ b/docs.js @@ -109,9 +109,9 @@ ns_list.forEach(function(ns_name) idx[i]= ns_name == 'GLib' ? 1 : ns[i].length ; ns[i].forEach( function(n) { var odata = XObject.extend( - Introspect.factory(actions[i], ns_name, n), - { 'left_bar' :ns['left_bar'] } - ); + Introspect.factory(actions[i], ns_name, n), + { 'left_bar' :ns['left_bar'] } + ); langs.forEach(function(lang) { Gio.simple_write(outputdir + '/'+ lang.name + '/' + ns_name + '.' + n + '.html', lang.cls_template.process(odata) @@ -129,32 +129,39 @@ 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(/\