diff --git a/html/inc/TDocParser.h b/html/inc/TDocParser.h index ec77d14b947fdfd9ad8e79a45aaf0ae6ef856a8a..64b2478717f294236b5fe1dc1682dbc4deb329a4 100644 --- a/html/inc/TDocParser.h +++ b/html/inc/TDocParser.h @@ -123,6 +123,7 @@ protected: TString fClassDescrTag; // tag for finding the class description TString fSourceInfoTags[kNumSourceInfos]; // tags for source info elements (copyright, last changed, author) TList fDirectiveHandlers;// handler for doc directives (TDocDirective objects) + Bool_t fAllowDirectives; // whether directives are to be interpreted std::set<UInt_t> fExtraLinesWithAnchor; // lines that need an additional anchor TString fSourceInfo[kNumSourceInfos];// author, last changed, ... TList fMethods[3]; // methods as TMethodWrapper objects (by access) diff --git a/html/src/TDocOutput.cxx b/html/src/TDocOutput.cxx index 168392c0e09dc8ef3abfaa6b611875f0fe710a1c..a1a3d9ebc08db744261f0e6b5dae914fe6a545f1 100644 --- a/html/src/TDocOutput.cxx +++ b/html/src/TDocOutput.cxx @@ -511,12 +511,12 @@ void TDocOutput::Convert(std::istream& in, const char* infilename, } out << "<table><tr><td style=\"vertical-align:top;padding-right:2em;\">" << endl; } - out << "<pre class=\"code\">" << endl; + out << "<div class=\"listing\"><pre class=\"listing\">" << endl; TDocParser parser(*this); parser.Convert(out, in, relpath, (includeOutput) /* determines whether it's code or not */); - out << "</pre>" << endl; + out << "</pre></div>" << endl; out << "<div id=\"linenums\">"; for (Long_t i = 0; i < parser.GetLineNumber(); ++i) out << "<div class=\"ln\"> <span class=\"ln\">" << i + 1 << "</span></div>"; diff --git a/html/src/TDocParser.cxx b/html/src/TDocParser.cxx index b3eab357068ad342141b4b8a409afc0385693b59..0353b1a7196d7b03b0eda928b56222c9b147da6b 100644 --- a/html/src/TDocParser.cxx +++ b/html/src/TDocParser.cxx @@ -134,7 +134,7 @@ TDocParser::TDocParser(TClassDocOutput& docOutput, TClass* cl): fCurrentClass(cl), fRecentClass(0), fCurrentModule(0), fDirectiveCount(0), fLineNumber(0), fDocContext(kIgnore), fCheckForMethod(kFALSE), fClassDocState(kClassDoc_Uninitialized), - fCommentAtBOL(kFALSE) + fCommentAtBOL(kFALSE), fAllowDirectives(kTRUE) { // Constructor called for parsing class sources @@ -170,7 +170,7 @@ TDocParser::TDocParser(TDocOutput& docOutput): fCurrentClass(0), fRecentClass(0), fDirectiveCount(0), fLineNumber(0), fDocContext(kIgnore), fCheckForMethod(kFALSE), fClassDocState(kClassDoc_Uninitialized), - fCommentAtBOL(kFALSE) + fCommentAtBOL(kFALSE), fAllowDirectives(kFALSE) { // constructor called for parsing text files with Convert() InitKeywords(); @@ -1195,6 +1195,9 @@ TClass* TDocParser::IsDirective(const TString& line, Ssiz_t pos, // from TDocHandler, and calling it TDocTagDirective for "BEGIN_TAG", // "END_TAG" blocks. + if (!fAllowDirectives) + return 0; + // '"' serves as escape char if (pos > 0 && line[pos - 1] == '"') return 0;