Changeset 1066


Ignore:
Timestamp:
Aug 12, 2012 3:44:12 PM (10 years ago)
Author:
jemian
Message:

fixes #14

File:
1 edited

Legend:

Unmodified
Added
Removed
  • specdomain/trunk/src/specdomain/sphinxcontrib/specdomain.py

    r1065 r1066  
    210210            self.add_line(u'', '<autodoc>')
    211211            self.add_line(u'.. rubric:: List of SPEC Macro Files in *%s*' % specdir, '<autodoc>')
     212            self.add_line(u'', '<autodoc>')
    212213            for filename in macrofiles:
     214                # Show a bullet list at the top of the page
     215                # This is an alternative to separate pages for each macro file
    213216                self.add_line(u'* :ref:`%s <%s>`' % (filename, filename), '<autodoc>')
     217            self.add_line(u'', '<autodoc>')
    214218            self.add_line(u'-'*15, '<autodoc>')         # delimiter
     219            self.add_line(u'', '<autodoc>')
    215220            for filename in macrofiles:
    216221                self.add_line(u'', '<autodoc>')
     
    241246
    242247    def add_target_and_index(self, name, sig, signode):
    243         targetname = '%s-%s' % (self.objtype, name)
     248        targetname = 'macro:%s:%s:%s:%s' % (self.objtype, name, signode.source, str(signode.line))
    244249        signode['ids'].append(targetname)
    245250        self.state.document.note_explicit_target(signode)
     
    316321        #text = u'! ' + sig      # TODO: How to use emphasized index entry in this context?
    317322        text = name.split()[0]   # when sig = "tth    #: scattering angle"
    318         targetname = '%s-%s' % (self.objtype, text)
     323        targetname = 'var:%s:%s:%s:%s' % (self.objtype, text, signode.source, str(signode.line))
    319324        signode['ids'].append(targetname)
    320325        # TODO: role does not point back to it yet
Note: See TracChangeset for help on using the changeset viewer.