Removing lexical scanner recognition of "## Author:" comments.

This functionality is better done manually by the script writer
embedding reST into the script summary section (##! comments).
This allows flexibility in choosing between different methods
to convey the same information (e.g. ":Author: <author>" or
the ".. codeauthor:: <author>" directive that Sphinx
configurations can recognize).
This commit is contained in:
Jon Siwek 2011-03-24 09:51:47 -05:00
parent 8b79971e21
commit c2f0332b5f
3 changed files with 0 additions and 20 deletions

View file

@ -112,9 +112,6 @@ void BroDoc::WriteDocFile() const
WriteSectionHeading("Summary", '-');
WriteStringList("%s\n", "%s\n\n", summary);
WriteToDoc(":Author(s): ");
WriteStringList("%s, ", "%s\n", authors);
WriteToDoc(":Imports: ");
WriteStringList(":doc:`%s`, ", ":doc:`%s`\n", imports);

View file

@ -83,13 +83,6 @@ public:
*/
void AddPortAnalysis(const std::string& analyzer, const std::string& ports);
/**
* Adds a script author.
* The scanner should call this when it sees "## Author: ..."
* @param s The name, email, etc. of the script author.
*/
void AddAuthor(const std::string& s) { authors.push_back(s); }
/**
* Schedules documentation of a script option. An option is
* defined as any variable in the script that is declared 'const'
@ -168,7 +161,6 @@ protected:
std::string source_filename;
std::string packet_filter;
std::list<std::string> authors;
std::list<std::string> modules;
std::list<std::string> summary;
std::list<std::string> imports;

View file

@ -146,15 +146,6 @@ ESCSEQ (\\([^\n]|[0-7]+|x[[:xdigit:]]+))
}
}
##{OWS}Author:.* {
if ( generate_documentation )
current_reST_doc->AddAuthor(
skip_whitespace( // Skip whitespace after "Author:"
skip_whitespace(yytext + 2) // Skip whitespace after ##
+ 7) // Skip "Author:"
);
}
<DOC>##<.* {
yylval.str = copy_string(canon_doc_comment(yytext + 3));
return TOK_POST_DOC;