diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2016-02-02 20:49:32 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2016-02-02 20:49:32 (GMT) |
commit | 3e6e2dcf8867a25b34f1db640519b78a1850ca62 (patch) | |
tree | 38767f069eb25834005a2a113155365aac0a0564 | |
parent | 50720068afa77484ec7253e7dca1e812050b33f1 (diff) | |
parent | be100f882604a23d94025fee6d059bdb5ec28d3e (diff) | |
download | Doxygen-3e6e2dcf8867a25b34f1db640519b78a1850ca62.zip Doxygen-3e6e2dcf8867a25b34f1db640519b78a1850ca62.tar.gz Doxygen-3e6e2dcf8867a25b34f1db640519b78a1850ca62.tar.bz2 |
Merge pull request #448 from albert-github/feature/bug_761139
Bug 761139 - python unicode docstrings are ignored
-rw-r--r-- | src/pyscanner.l | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/pyscanner.l b/src/pyscanner.l index ac453b1..35d305d 100644 --- a/src/pyscanner.l +++ b/src/pyscanner.l @@ -368,7 +368,7 @@ static void initTriDoubleQuoteBlock() docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; - docBlockSpecial = yytext[3]=='!'; + docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; docBlock.resize(0); g_doubleQuote = TRUE; startCommentBlock(FALSE); @@ -379,7 +379,7 @@ static void initTriSingleQuoteBlock() docBlockContext = YY_START; docBlockInBody = FALSE; docBlockJavaStyle = TRUE; - docBlockSpecial = yytext[3]=='!'; + docBlockSpecial = yytext[strlen(yytext) - 1]=='!'; docBlock.resize(0); g_doubleQuote = FALSE; startCommentBlock(FALSE); @@ -470,8 +470,10 @@ IDENTIFIER ({LETTER}|"_")({LETTER}|{DIGIT}|"_")* SCOPE {IDENTIFIER}("."{IDENTIFIER})* BORDER ([^A-Za-z0-9]) -TRISINGLEQUOTE "'''"(!)? -TRIDOUBLEQUOTE "\"\"\""(!)? +TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)? +TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)? +ENDTRISINGLEQUOTE "'''" +ENDTRIDOUBLEQUOTE "\"\"\"" LONGSTRINGCHAR [^\\"'] ESCAPESEQ ("\\")(.) LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ}) @@ -1369,8 +1371,8 @@ STARTDOCSYMS "##" } <TripleComment>{ - {TRIDOUBLEQUOTE} | - {TRISINGLEQUOTE} { + {ENDTRIDOUBLEQUOTE} | + {ENDTRISINGLEQUOTE} { // printf("Expected module block %d special=%d\n",g_expectModuleDocs,g_specialBlock); if (g_doubleQuote==(yytext[0]=='"')) { @@ -1515,8 +1517,8 @@ STARTDOCSYMS "##" } <TripleString>{ - {TRIDOUBLEQUOTE} | - {TRISINGLEQUOTE} { + {ENDTRIDOUBLEQUOTE} | + {ENDTRISINGLEQUOTE} { *g_copyString += yytext; if (g_doubleQuote==(yytext[0]=='"')) { |