Skip to content

Commit c56bc2a

Browse files
Fix issue if user use an outdated version of core
1 parent e140d15 commit c56bc2a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pyqode/python/modes/syntax_highlighter.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,10 @@ def highlightDocstringTags(self, text):
303303

304304
def doHighlightBlock(self, text):
305305
usd = self.currentBlock().userData()
306-
usd.cc_disabled_zones[:] = []
306+
if hasattr(usd, "cc_disabled_zones"):
307+
usd.cc_disabled_zones[:] = []
308+
else:
309+
usd.cc_disabled_zones = []
307310
if self.match_multiline(text):
308311
self.highlightSpaces(text)
309312
self.highlightDocstringTags(text)

0 commit comments

Comments
 (0)