cortav  Diff

Differences From Artifact [00eceed9de]:

To Artifact [08a1a9b804]:


   141    141   						return arg
   142    142   					else return sp end
   143    143   				end)
   144    144   
   145    145   			end
   146    146   
   147    147   			local function checkFromSec(sec,doc)
   148         -				if sec and not id:find'%.' then
   149         -					local rid = sec.refs[id]
   150         -					if rid then
   151         -						return rid, id, sec
          148  +				if not id:find'%.' then
          149  +					if sec then
          150  +						local rid = sec.refs[id]
          151  +						if rid then
          152  +							return rid, id, sec
          153  +						end
   152    154   					end
   153    155   
   154         -					if doc.sections[rid] then
   155         -						return nil, id, doc.sections[rid]
          156  +					if doc.sections[id] then
          157  +						return nil, id, doc.sections[id]
   156    158   					end
   157    159   				else
   158    160   					local secid, ref = string.match(id, "(.-)%.(.+)")
   159    161   					local s
   160    162   					s = s or doc.sections[secid]
   161    163   					if s then
   162    164   						if s.refs[ref] then
................................................................................
   196    198   					rid = self.invocation.origin:ref(id)
   197    199   					if rid then
   198    200   						return rid, id, self.invocation.origin.sec
   199    201   					end
   200    202   				end
   201    203   			end
   202    204   
   203         -			o,i,s = scanParents(doc)
          205  +			o,i,s = scanParents(self.doc)
   204    206   			if o or s then return o,i,s end
   205    207   
   206    208   			self:fail("ID ā€œ%sā€ does not name an object or section", id)
   207    209   		end
   208    210   	};
   209    211   }
   210    212