@@ -2430,6 +2430,20 @@ STopt [^\n@\\]*
24302430 BEGIN (Comment);
24312431 }
24322432 }
2433+ <SkipInternal >[@ \\ ]/ " subparagraph" [ \t ] {
2434+ if (yyextra->sectionLevel >4 )
2435+ {
2436+ unput (' \\ ' );
2437+ BEGIN (Comment);
2438+ }
2439+ }
2440+ <SkipInternal >[@ \\ ]/ " subsubparagraph" [ \t ] {
2441+ if (yyextra->sectionLevel >5 )
2442+ {
2443+ unput (' \\ ' );
2444+ BEGIN (Comment);
2445+ }
2446+ }
24332447<SkipInternal >[@ \\ ]" endinternal" [ \t ]* {
24342448 BEGIN (Comment);
24352449 }
@@ -3188,7 +3202,7 @@ static bool handleSection(yyscan_t yyscanner,const QCString &s, const StringVect
31883202 else if (s==" subparagraph" ) yyextra->sectionLevel =5 ;
31893203 else if (s==" subsubparagraph" ) yyextra->sectionLevel =6 ;
31903204 // raise it if requested
3191- yyextra->sectionLevel = std::min (yyextra->sectionLevel + yyextra->raiseLevel ,6 );
3205+ yyextra->sectionLevel = std::min (yyextra->sectionLevel + yyextra->raiseLevel ,Section::MaxLevel );
31923206 // rewrite the update section level to the output
31933207 switch (yyextra->sectionLevel )
31943208 {
@@ -3885,7 +3899,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &o
38853899 {
38863900 QCString opt = QCString (opt_).stripWhiteSpace ().lower ();
38873901 char dum;
3888- int level = 5 ;
3902+ int level = Section::MaxLevel ;
38893903 int i = opt.find (' :' );
38903904 if (i>0 ) // found ':' but not on position 0 what would mean just a level
38913905 {
@@ -3896,8 +3910,7 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &o
38963910 }
38973911 else
38983912 {
3899- level = (level > 5 ? 5 : level);
3900- level = (level <= 0 ? 5 : level);
3913+ level = level<=0 ? Section::MaxLevel : std::min (level,Section::MaxLevel);
39013914 opt = opt.left (i).stripWhiteSpace ();
39023915 }
39033916 }
@@ -3928,8 +3941,8 @@ static bool handleToc(yyscan_t yyscanner,const QCString &, const StringVector &o
39283941 if (yyextra->current ->localToc .nothingEnabled ())
39293942 {
39303943 // for backward compatibility
3931- yyextra->current ->localToc .enableHtml (5 );
3932- yyextra->current ->localToc .enableXml (5 );
3944+ yyextra->current ->localToc .enableHtml (Section::MaxLevel );
3945+ yyextra->current ->localToc .enableXml (Section::MaxLevel );
39333946 }
39343947 }
39353948 return FALSE ;
0 commit comments