Changeset 229


Ignore:
Timestamp:
08/08/09 05:01:29 (10 years ago)
Author:
bretzel_parpg
Message:

Fixed quotes still showing in green when in a comment

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/PARPG/tools/Writing Editor/scripts/syntaxHighlight.py

    r227 r229  
    5454                startExp = QtCore.QRegExp(cmd) 
    5555                startIndex = text.indexOf(startExp) 
    56                 endIndex = text.indexOf(startExp, startIndex+1) 
    57                 quoteLength = endIndex - startIndex + 1 
    58                 self.setFormat(startIndex, quoteLength, quoteFormat) 
     56                if (self.format(startIndex) == singleLineCommentFormat or 
     57                    self.format(startIndex) == multiLineCommentFormat): 
     58                    return 
     59                else: 
     60                    endIndex = text.indexOf(startExp, startIndex+1) 
     61                    quoteLength = endIndex - startIndex + 1 
     62                    self.setFormat(startIndex, quoteLength, quoteFormat) 
    5963                 
    6064            # if its a singeline comment 
Note: See TracChangeset for help on using the changeset viewer.