summaryrefslogtreecommitdiffstats
path: root/src/pre.l
diff options
context:
space:
mode:
authorhalex2005 <halex2005@e1.ru>2015-03-30 13:26:58 (GMT)
committerhalex2005 <halex2005@e1.ru>2015-03-30 13:26:58 (GMT)
commit288ea42fc27389160c20912003a7972e21195265 (patch)
tree9cf5d2b3c7a1a40898a7b779da19edd7be5cfb56 /src/pre.l
parent9d631b571bcf1826d00287bb82d8aac2da0a55c8 (diff)
downloadDoxygen-288ea42fc27389160c20912003a7972e21195265.zip
Doxygen-288ea42fc27389160c20912003a7972e21195265.tar.gz
Doxygen-288ea42fc27389160c20912003a7972e21195265.tar.bz2
add support for github flavored fenced code blocks
Diffstat (limited to 'src/pre.l')
-rw-r--r--src/pre.l20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/pre.l b/src/pre.l
index 7c2ec2b..7865966 100644
--- a/src/pre.l
+++ b/src/pre.l
@@ -2465,6 +2465,19 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipVerbatim);
}
}
+<SkipCComment>"```"[~]* {
+ static bool markdownSupport = Config_getBool("MARKDOWN_SUPPORT");
+ if (!markdownSupport)
+ {
+ REJECT;
+ }
+ else
+ {
+ outputArray(yytext,(int)yyleng);
+ g_fenceSize=yyleng;
+ BEGIN(SkipVerbatim);
+ }
+ }
<SkipCComment>[\\@][\\@]("verbatim"|"latexonly"|"htmlonly"|"xmlonly"|"docbookonly"|"rtfonly"|"manonly"|"dot"|"code"("{"[^}]*"}")?){BN}+ {
outputArray(yytext,(int)yyleng);
g_yyLineNr+=QCString(yytext).contains('\n');
@@ -2606,6 +2619,13 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN(SkipCComment);
}
}
+<SkipVerbatim>"```"[~]* {
+ outputArray(yytext,(int)yyleng);
+ if (g_fenceSize==yyleng)
+ {
+ BEGIN(SkipCComment);
+ }
+ }
<SkipVerbatim>"*/"|"/*" {
outputArray(yytext,(int)yyleng);
}