Skip to content

Commit 8bc3d9d

Browse files
committed
issue #10700 Include command in class documentation (part 2)
1 parent 5cbe566 commit 8bc3d9d

File tree

3 files changed

+25
-4
lines changed

3 files changed

+25
-4
lines changed

src/commentcnv.l

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1022,6 +1022,27 @@ SLASHopt [/]*
10221022
<CComment,CNComment,ReadLine>[\\@][\\@][~a-z_A-Z][a-z_A-Z0-9]*[ \t]* { // escaped command
10231023
copyToOutput(yyscanner,yytext,yyleng);
10241024
}
1025+
1026+
<CComment,ReadLine,IncludeFile>[ \t][ \t][ \t][ \t][\\@]("include{"{B}*"doc"{B}*"}"|"includedoc") { // Markdown code section
1027+
if (Config_getBool(MARKDOWN_SUPPORT))
1028+
{
1029+
copyToOutput(yyscanner,yytext,yyleng);
1030+
}
1031+
else
1032+
{
1033+
REJECT;
1034+
}
1035+
}
1036+
<CComment,ReadLine,IncludeFile>[ \t][ \t][ \t][ \t][\\@]("snippet{"{B}*"doc"{B}*"}"|"snippetdoc") { // Markdown code section
1037+
if (Config_getBool(MARKDOWN_SUPPORT))
1038+
{
1039+
copyToOutput(yyscanner,yytext,yyleng);
1040+
}
1041+
else
1042+
{
1043+
REJECT;
1044+
}
1045+
}
10251046
<CComment,ReadLine,IncludeFile>[\\@]("include{"{B}*"doc"{B}*"}"|"includedoc") {
10261047
yyextra->includeCtx = YY_START;
10271048
yyextra->firstIncludeLine = true;

src/commentscan.l

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4337,7 +4337,7 @@ static inline void setOutput(yyscan_t yyscanner,OutputContext ctx)
43374337
{
43384338
yyextra->current->brief = yyextra->current->brief.left(yyextra->current->brief.length()-cnt);
43394339
// set warning line correct
4340-
yyextra->current->brief += "\\iline " + QCString().setNum(cnt + static_cast<int>(std::stoul(match[1].str()))) + " \\ilinebr ";
4340+
yyextra->current->brief += " \\iline " + QCString().setNum(cnt + static_cast<int>(std::stoul(match[1].str()))) + " \\ilinebr ";
43414341
}
43424342
foundMatch = true;
43434343
}
@@ -4427,14 +4427,14 @@ static inline void addOutput(yyscan_t yyscanner,char c)
44274427
static void addIline(yyscan_t yyscanner,int lineNr)
44284428
{
44294429
char cmd[20];
4430-
qsnprintf(cmd,20,"\\iline %d ",lineNr);
4430+
qsnprintf(cmd,20," \\iline %d ",lineNr);
44314431
addOutput(yyscanner, cmd);
44324432
}
44334433

44344434
static void addIlineBreak(yyscan_t yyscanner,int lineNr)
44354435
{
44364436
char cmd[30];
4437-
qsnprintf(cmd,30,"\\iline %d \\ilinebr ",lineNr);
4437+
qsnprintf(cmd,30," \\iline %d \\ilinebr ",lineNr);
44384438
addOutput(yyscanner, cmd);
44394439
}
44404440

vhdlparser/vhdl_adj.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import sys
1616
import re
1717

18-
message_re = re.compile('message\s*\+=\s*("[^"]*")')
18+
message_re = re.compile(r'message\s*\+=\s*("[^"]*")')
1919

2020
def main():
2121
inputFile = open(sys.argv[1], 'r')

0 commit comments

Comments
 (0)