diff options
author | Dimitri van Heesch <doxygen@gmail.com> | 2018-11-12 21:24:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-12 21:24:33 (GMT) |
commit | a7803b58cf4359b0dbf44e3c4346283cc4242b6e (patch) | |
tree | 4bc3596e7f6e45f12009dd56b86ec59233f91ba1 /src | |
parent | 50fd576df4e346761a08f84b502ad976295d487c (diff) | |
parent | d748615666f7fac43880f0d3ec859d11ad304deb (diff) | |
download | Doxygen-a7803b58cf4359b0dbf44e3c4346283cc4242b6e.zip Doxygen-a7803b58cf4359b0dbf44e3c4346283cc4242b6e.tar.gz Doxygen-a7803b58cf4359b0dbf44e3c4346283cc4242b6e.tar.bz2 |
Merge pull request #6614 from albert-github/feature/issue_6612
issue 6612 Issue with handling of emoji
Diffstat (limited to 'src')
-rw-r--r-- | src/doctokenizer.l | 49 |
1 files changed, 39 insertions, 10 deletions
diff --git a/src/doctokenizer.l b/src/doctokenizer.l index 0a3c0cf..cd5d926 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -38,6 +38,7 @@ #include "definition.h" #include "doxygen.h" #include "portable.h" +#include "cite.h" #define YY_NO_INPUT 1 #define YY_NO_UNISTD_H 1 @@ -395,9 +396,9 @@ CHARWORDQ [^ \t\n\r\\@<>()\[\]:;\?{}&%$#,."='] ESCWORD ("%"{ID}(("::"|"."){ID})*)|("%'") CHARWORDQ1 [^ \-+0-9\t\n\r\\@<>()\[\]:;\?{}&%$#,."='] WORD1 {ESCWORD}|{CHARWORDQ1}{CHARWORDQ}*|"{"|"}"|"'\"'"|("\""[^"\n]*\n?[^"\n]*"\"") -WORD2 "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'" +WORD2 "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'" WORD1NQ {ESCWORD}|{CHARWORDQ}+|"{"|"}" -WORD2NQ "."|","|"("|")"|"["|"]"|":"|";"|"\?"|"="|"'" +WORD2NQ "."|","|"("|")"|"["|"]"|"::"|":"|";"|"\?"|"="|"'" CAPTION [cC][aA][pP][tT][iI][oO][nN] HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*{WS}*(("/")?)">" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"sup"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"|"strike"|"u" @@ -682,8 +683,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_SYMBOL; } <St_Para,St_Text>{EMOJI} { /* emoji symbol */ - g_token->name = yytext; - return TK_EMOJI; + if (g_fileName == CiteConsts::fileName) + { + REJECT; + } + else + { + g_token->name = yytext; + return TK_EMOJI; + } } /********* patterns for linkable words ******************/ @@ -932,8 +940,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_SYMBOL; } <St_TitleN>{EMOJI} { /* emoji */ - g_token->name = yytext; - return TK_EMOJI; + if (g_fileName == CiteConsts::fileName) + { + REJECT; + } + else + { + g_token->name = yytext; + return TK_EMOJI; + } } <St_TitleN>{HTMLTAG} { } @@ -972,8 +987,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_SYMBOL; } <St_TitleQ>{EMOJI} { /* emoji */ - g_token->name = yytext; - return TK_EMOJI; + if (g_fileName == CiteConsts::fileName) + { + REJECT; + } + else + { + g_token->name = yytext; + return TK_EMOJI; + } } <St_TitleQ>{SPCMD1} | <St_TitleQ>{SPCMD2} { /* special command */ @@ -1107,8 +1129,15 @@ REFWORD_NOCV {FILEMASK}|{LABELID}|{REFWORD2_NOCV}|{REFWORD3}|{REFWORD4_NOCV} return TK_SYMBOL; } <St_Ref2>{EMOJI} { /* emoji */ - g_token->name = yytext; - return TK_EMOJI; + if (g_fileName == CiteConsts::fileName) + { + REJECT; + } + else + { + g_token->name = yytext; + return TK_EMOJI; + } } <St_Ref2>{SPCMD1} | <St_Ref2>{SPCMD2} { /* special command */ |