Changes between Version 1 and Version 2 of TracDev/PluginDevelopment/ExtensionPoints/trac.mimeview.api.IHTMLPreviewAnnotator
- Timestamp:
- Jul 23, 2011, 10:29:23 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/PluginDevelopment/ExtensionPoints/trac.mimeview.api.IHTMLPreviewAnnotator
v1 v2 44 44 45 45 def get_annotation_data(self, context): 46 self.violations = 0 47 return None 46 return {'violations': 0} 48 47 49 48 def annotate_row(self, context, row, lineno, line, data): 50 49 if len(to_unicode(line)) > 79: 50 data['violations'] += 1 51 51 row.append(tag.th(tag.a(_('!'), 52 href='#Violation%d' % self.violations),52 href='#Violation%d' % data['violations']), 53 53 title=_('Line is too long'), 54 id_='Violation%d' % self.violations))54 id_='Violation%d' % data['violations'])) 55 55 else: 56 56 row.append(tag.th())