@@ -80,7 +80,8 @@ struct doctokenizerYY_state
80
80
QCString fileName;
81
81
bool insidePre = false ;
82
82
int sharpCount=0 ;
83
- bool markdownSupport=TRUE ;
83
+ bool markdownSupport=true ;
84
+ bool insideHtmlLink=false ;
84
85
85
86
// context for section finding phase
86
87
const Definition *definition = 0 ;
@@ -408,6 +409,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
408
409
%%
409
410
<St_Para>\r /* skip carriage return */
410
411
<St_Para>^{LISTITEM} { /* list item */
412
+ if (yyextra->insideHtmlLink ) REJECT;
411
413
lineCount (yytext,yyleng);
412
414
QCString text (yytext);
413
415
uint32_t dashPos = static_cast <uint32_t >(text.findRev (' -' ));
@@ -418,7 +420,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
418
420
return TK_LISTITEM;
419
421
}
420
422
<St_Para>^{MLISTITEM} { /* list item */
421
- if (!yyextra->markdownSupport || yyextra->insidePre )
423
+ if (yyextra-> insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre )
422
424
{
423
425
REJECT;
424
426
}
@@ -438,7 +440,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
438
440
}
439
441
}
440
442
<St_Para>^{OLISTITEM} { /* numbered list item */
441
- if (!yyextra->markdownSupport || yyextra->insidePre )
443
+ if (yyextra-> insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre )
442
444
{
443
445
REJECT;
444
446
}
@@ -463,6 +465,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
463
465
}
464
466
}
465
467
<St_Para>{BLANK}*(\n|" \\ ilinebr" ){LISTITEM} { /* list item on next line */
468
+ if (yyextra->insideHtmlLink ) REJECT;
466
469
lineCount (yytext,yyleng);
467
470
QCString text=extractPartAfterNewLine (QCString (yytext));
468
471
uint32_t dashPos = static_cast <uint32_t >(text.findRev (' -' ));
@@ -473,7 +476,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
473
476
return TK_LISTITEM;
474
477
}
475
478
<St_Para>{BLANK}*(\n|" \\ ilinebr" ){MLISTITEM} { /* list item on next line */
476
- if (!yyextra->markdownSupport || yyextra->insidePre )
479
+ if (yyextra-> insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre )
477
480
{
478
481
REJECT;
479
482
}
@@ -493,7 +496,7 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
493
496
}
494
497
}
495
498
<St_Para>{BLANK}*(\n|" \\ ilinebr" ){OLISTITEM} { /* list item on next line */
496
- if (!yyextra->markdownSupport || yyextra->insidePre )
499
+ if (yyextra-> insideHtmlLink || !yyextra->markdownSupport || yyextra->insidePre )
497
500
{
498
501
REJECT;
499
502
}
@@ -519,12 +522,14 @@ SHOWDATE ([0-9]{4}"-"[0-9]{1,2}"-"[0-9]{1,2})?({WS}*[0-9]{1,2}":"[0-9]{1,2}(":"[
519
522
}
520
523
}
521
524
<St_Para>^{ENDLIST} { /* end list */
525
+ if (yyextra->insideHtmlLink ) REJECT;
522
526
lineCount (yytext,yyleng);
523
527
size_t dotPos = static_cast <size_t >(QCString (yytext).findRev (' .' ));
524
528
yyextra->token ->indent = computeIndent (yytext,dotPos);
525
529
return TK_ENDLIST;
526
530
}
527
531
<St_Para>{BLANK}*(\n|" \\ ilinebr" ){ENDLIST} { /* end list on next line */
532
+ if (yyextra->insideHtmlLink ) REJECT;
528
533
lineCount (yytext,yyleng);
529
534
QCString text=extractPartAfterNewLine (QCString (yytext));
530
535
size_t dotPos = static_cast <size_t >(text.findRev (' .' ));
@@ -1758,7 +1763,7 @@ void DocTokenizer::findSections(const QCString &input,const Definition *d,
1758
1763
doctokenizerYYlex(yyscanner);
1759
1764
}
1760
1765
1761
- void DocTokenizer::init(const char *input,const QCString &fileName,bool markdownSupport)
1766
+ void DocTokenizer::init(const char *input,const QCString &fileName,bool markdownSupport, bool insideHtmlLink )
1762
1767
{
1763
1768
yyscan_t yyscanner = p->yyscanner;
1764
1769
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
@@ -1768,6 +1773,7 @@ void DocTokenizer::init(const char *input,const QCString &fileName,bool markdown
1768
1773
yyextra->fileName = fileName;
1769
1774
yyextra->insidePre = FALSE;
1770
1775
yyextra->markdownSupport = markdownSupport;
1776
+ yyextra->insideHtmlLink = insideHtmlLink;
1771
1777
BEGIN(St_Para);
1772
1778
}
1773
1779
0 commit comments