QScintilla/Lexers/LexerXML.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3011
18292228c724
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
40 self.setFoldPreprocessor(Preferences.getEditor("HtmlFoldPreprocessor")) 40 self.setFoldPreprocessor(Preferences.getEditor("HtmlFoldPreprocessor"))
41 self.setCaseSensitiveTags( 41 self.setCaseSensitiveTags(
42 Preferences.getEditor("HtmlCaseSensitiveTags")) 42 Preferences.getEditor("HtmlCaseSensitiveTags"))
43 self.setFoldCompact(Preferences.getEditor("AllFoldCompact")) 43 self.setFoldCompact(Preferences.getEditor("AllFoldCompact"))
44 try: 44 try:
45 self.setFoldScriptComments(Preferences.getEditor("HtmlFoldScriptComments")) 45 self.setFoldScriptComments(
46 self.setFoldScriptHeredocs(Preferences.getEditor("HtmlFoldScriptHeredocs")) 46 Preferences.getEditor("HtmlFoldScriptComments"))
47 self.setFoldScriptHeredocs(
48 Preferences.getEditor("HtmlFoldScriptHeredocs"))
47 self.setScriptsStyled(Preferences.getEditor("XMLStyleScripts")) 49 self.setScriptsStyled(Preferences.getEditor("XMLStyleScripts"))
48 except AttributeError: 50 except AttributeError:
49 pass 51 pass
50 52
51 def isCommentStyle(self, style): 53 def isCommentStyle(self, style):
52 """ 54 """
53 Public method to check, if a style is a comment style. 55 Public method to check, if a style is a comment style.
54 56
57 @param style style to check (integer)
55 @return flag indicating a comment style (boolean) 58 @return flag indicating a comment style (boolean)
56 """ 59 """
57 return style in [QsciLexerXML.HTMLComment, 60 return style in [QsciLexerXML.HTMLComment,
58 QsciLexerXML.ASPXCComment, 61 QsciLexerXML.ASPXCComment,
59 QsciLexerXML.SGMLComment, 62 QsciLexerXML.SGMLComment,
72 75
73 def isStringStyle(self, style): 76 def isStringStyle(self, style):
74 """ 77 """
75 Public method to check, if a style is a string style. 78 Public method to check, if a style is a string style.
76 79
80 @param style style to check (integer)
77 @return flag indicating a string style (boolean) 81 @return flag indicating a string style (boolean)
78 """ 82 """
79 return style in [QsciLexerXML.HTMLDoubleQuotedString, 83 return style in [QsciLexerXML.HTMLDoubleQuotedString,
80 QsciLexerXML.HTMLSingleQuotedString, 84 QsciLexerXML.HTMLSingleQuotedString,
81 QsciLexerXML.SGMLDoubleQuotedString, 85 QsciLexerXML.SGMLDoubleQuotedString,

eric ide

mercurial