Skip to content

Commit

Permalink
Bug 761139 - python unicode docstrings are ignored
Browse files Browse the repository at this point in the history
End of the doctrings can be only triple double or single quotes not with optional u or r or even ! at the end.
  • Loading branch information
albert-github committed Jan 29, 2016
1 parent 936f242 commit be100f8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/pyscanner.l
Expand Up @@ -472,6 +472,8 @@ BORDER ([^A-Za-z0-9])

TRISINGLEQUOTE {STRINGPREFIX}?"'''"(!)?
TRIDOUBLEQUOTE {STRINGPREFIX}?"\"\"\""(!)?
ENDTRISINGLEQUOTE "'''"
ENDTRIDOUBLEQUOTE "\"\"\""
LONGSTRINGCHAR [^\\"']
ESCAPESEQ ("\\")(.)
LONGSTRINGITEM ({LONGSTRINGCHAR}|{ESCAPESEQ})
Expand Down Expand Up @@ -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]=='"'))
{
Expand Down Expand Up @@ -1515,8 +1517,8 @@ STARTDOCSYMS "##"
}

<TripleString>{
{TRIDOUBLEQUOTE} |
{TRISINGLEQUOTE} {
{ENDTRIDOUBLEQUOTE} |
{ENDTRISINGLEQUOTE} {
*g_copyString += yytext;
if (g_doubleQuote==(yytext[0]=='"'))
{
Expand Down

0 comments on commit be100f8

Please sign in to comment.