Changes between Version 7 and Version 8 of CodeTagsPlugin


Ignore:
Timestamp:
Dec 7, 2006, 6:20:00 AM (17 years ago)
Author:
Anton Graham
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeTagsPlugin

    v7 v8  
    1313
    1414User submitted patch seems to work: http://trac.pocoo.org/attachment/ticket/109/diff.txt
     15
     16Additional configuration information in trac.ini:
     17{{{
     18[code-tags]
     19scan_files = *.html, *.py, *.c, *.h, *.hh, *.m, *.pch, *.hpp
     20scan_folders = trunk/*, branches/*
     21tags = XXX, TODO, FIXME, BUG
     22}}}
     23
     24scan_files allows you to define specific file types to scan (default: *)
     25scan_folders specifies which directories within the repository to scan (default: *)
     26tags allows you to specify what tags to locate, though only the defaults are colored at all. (default: XXX, TODO, FIXME)
     27
     28Given the configuration options, I feel that the above referenced patch is unneeded if you have configured properly.  On the other hand, there are legitimate uses for long strings of XXX's without them being a code tag.  A simple one line change in indexer.py would eliminate 99% of XXX tags that were unintentional by requiring them to end with a colon:
     29
     30{{{
     31#!diff
     32Index: indexer.py
     33===================================================================
     34--- indexer.py  (revision 2368)
     35+++ indexer.py  (working copy)
     36@@ -27,7 +27,7 @@
     37         
     38         p = []
     39         for word in self.tags:
     40-            p.append(re.escape(word))
     41+            p.append(re.escape(word + ':'))
     42         self.tag_re = re.compile(r'(%s)\:?\s*(.*?)\s*$' % '|'.join(p))
     43 
     44         cdir = os.path.join(os.path.abspath(env.path), 'cache', 'codetags')
     45}}}