From cf45ae19e168e9af4f18dcbf1b186b7bc50baaa3 Mon Sep 17 00:00:00 2001 From: Jon Siwek Date: Wed, 30 Mar 2011 10:24:44 -0500 Subject: [PATCH] Generated script docs can now link to the original source. The original bro source file needs to be copied to the same directory that Sphinx outputs the rendered html. --- src/BroDoc.cc | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/BroDoc.cc b/src/BroDoc.cc index 4b676de8f5..6a91f59153 100644 --- a/src/BroDoc.cc +++ b/src/BroDoc.cc @@ -105,10 +105,9 @@ void BroDoc::WriteDocFile() const { WriteToDoc(".. Automatically generated. Do not edit.\n\n"); - WriteToDoc("%s\n", source_filename.c_str()); - for ( size_t i = 0; i < source_filename.length(); ++i ) - WriteToDoc("="); - WriteToDoc("\n\n"); + WriteSectionHeading(source_filename.c_str(), '='); + + WriteToDoc("\n`Original Source File <%s>`_\n\n", source_filename.c_str()); WriteSectionHeading("Summary", '-'); WriteStringList("%s\n", "%s\n\n", summary);