Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /leo/plugins/rst3.py

leo
Discussion topic

Back to topic list

CVS update: /leo/plugins/rst3.py

Author bwmulder
Full name Bernhard Mulder
Date 2006-10-17 13:37:01 PDT
Message User: bwmulder
Date: 2006-10-17 13:37:01-0700
Log:
 <span> can also be a target; no need for list of files; Added iterator_generator for single file case

File Changes:

Directory: /leo/plugins/
========================

File [changed]: rst3.py
Url: http://leo.tigris.or​g/source/browse/leo/​plugins/rst3.py?r1=1​.17&r2=1.18
Delta lines: +5 -10
--------------------
--- rst3.py 2006-10-17 08:34:10-0700 1.17
+++ rst3.py 2006-10-17 13:36:58-0700 1.18
@@ -308,8 +308,9 @@
         if tag == 'a':
             return True
             
- result = self.is_node_marker(attrs)
- return result
+ if self.is_node_marker(attrs):
+ return True
+ return tag == "span"
     #@-node:ekr.20050805​162550.42:is_anchor
     #@+node:ekr.20050805​162550.43:is_link
     def is_link(self, tag, attrs):
@@ -512,7 +513,7 @@
             # the pathname?
     
         for name, value in attrs:
- if name == 'name':
+ if name == 'name' or tag == 'span' and name == 'id':
                 if not value.startswith(sel​f.node_begin_marker)​:
                     if bwm_file: print >> bwm_file, "anchor(2):", value, self.p
                     self.anchor_map[value] = (self.current_file, self.p.copy())
@@ -645,11 +646,6 @@
         self.rst3_all = False
         # Set to True by the button which processes all @rst trees.
         
- self.http_filenames = {}
- if 0:
- print "Check if http_filenames is really needed. Maybe the positions are already in http_map"
- # Maps (simple) filenames to positions.
-
         # For writing.
         self.defaultEncoding = 'utf-8'
         self.leoDirectivesList = leoColor.leoKeywords
@@ -1157,7 +1153,6 @@
                         self.ext = ext
                     else:
                         self.ext = g.os_path_splitext(s​elf.outputFileName)[​1].lower()
- self.http_filenames[​g.os_path_split(self​.outputFileName)[1]]​ = p
                     # g.trace('ext',self.e​xt,self.outputFileNa​me)
                     if self.ext in ('.htm','.html','.tex','.pdf'):
                         ok = self.writeSpecialTre​e(p,toString=toStrin​g,justOneFile=justOn​eFile)
@@ -1802,7 +1797,7 @@
             self.set_initial_htt​p_attributes(filenam​e)
             self.find_anchors(p)
             if justOneFile:
- self.relocate_references()
+ self.relocate_refere​nces(p.self_and_subt​ree_iter)
         
             g.es_print('html updated for http plugin',color="blue")

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /leo/plugins/rst3.py bwmulder Bernhard Mulder 2006-10-17 13:37:01 PDT
Messages per page: