Changeset 1507

Show
Ignore:
Timestamp:
09/28/08 14:07:33 (2 months ago)
Author:
pierregm
Message:

docscraper
* fixed _fix_see_also to allow the use of fields

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/timeseries/scikits/timeseries/doc/ext/docscraper.py

    r1458 r1507  
    590590            if not line.strip(): continue 
    591591            if ':' in line: 
     592                match = field_rgx.match(line) 
     593                if match: 
     594                    (func_role, current_func) = match.groups() 
     595                    current_func = current_func.replace("`", '') 
     596                    rest = None 
    592597                if current_func: 
    593                     functions.append((current_func, rest)) 
     598                    functions.append((current_func, rest, func_role)) 
    594599                r = line.split(':', 1) 
    595600                current_func = r[0].strip() 
     
    601606            elif not line.startswith(' '): 
    602607                if current_func: 
    603                     functions.append((current_func, rest)) 
     608                    functions.append((current_func, rest, func_role)) 
    604609                    current_func = None 
    605610                    rest = Docstring([]) 
     
    614619                rest.append(line.strip()) 
    615620        if current_func: 
    616             functions.append((current_func, rest)) 
     621            functions.append((current_func, rest, func_role)) 
     622        # 
     623        print "DEBUG: functions", functions 
    617624        # 
    618625        output = [] 
    619626        last_had_desc = True 
    620         for (func, desc) in functions: 
     627        for (func, desc, func_role) in functions: 
    621628            if func_role: 
    622629                link = ":%s:`%s`" % (func_role, func)