450: def create_source_code_file(code_body)
451: template_regexp = Regexp.new("\\." + @options.template + "$")
452: meth_path = @html_class.path.sub(template_regexp, '.src')
453: File.makedirs(meth_path)
454: file_path = File.join(meth_path, @seq) + '.' + @options.template
455:
456: template = TemplatePage.new(RDoc::Page::SRC_PAGE)
457: File.open(file_path, "w") do |f|
458: values = {
459: 'title' => CGI.escapeHTML(index_name),
460: 'code' => code_body,
461: 'style_url' => style_url(file_path, @options.css),
462: 'mathml_xsl_url' => style_url('', "mathml.xsl"),
463: 'charset' => @options.charset
464: }
465: template.write_html_on(f, values)
466: end
467: XHTMLGenerator.gen_url(path, file_path)
468: end