def potentially_referenced_list(array)
            res = []
            array.each do |i|
                ref = AllReferences[i.name] 
                #         if !ref
                #           container = @context.parent
                #           while !ref && container
                #             name = container.name + "::" + i.name
                #             ref = AllReferences[name] 
                #             container = container.parent
                #           end
                #         end

                ref = @context.find_symbol(i.name)
                ref = ref.viewer if ref

                if !ref && block_given?
                    possibles = yield(i.name)
                    while !ref and !possibles.empty?
                        ref = AllReferences[possibles.shift]
                    end
                end
                h_name = CGI.escapeHTML(i.name)
                if ref and ref.document_self
                    path = ref.path
                    res << { "name" => h_name, "href" => path }
                else
                    res << { "name" => h_name, "href" => "" }
                end
            end
            res
        end
def potentially_referenced_list(array)
            res = []
            array.each do |i|
                ref = AllReferences[i.name] 
                #         if !ref
                #           container = @context.parent
                #           while !ref && container
                #             name = container.name + "::" + i.name
                #             ref = AllReferences[name] 
                #             container = container.parent
                #           end
                #         end

                ref = @context.find_symbol(i.name)
                ref = ref.viewer if ref

                if !ref && block_given?
                    possibles = yield(i.name)
                    while !ref and !possibles.empty?
                        ref = AllReferences[possibles.shift]
                    end
                end
                h_name = CGI.escapeHTML(i.name)
                if ref and ref.document_self
                    path = ref.path
                    res << { "name" => h_name, "href" => path }
                else
                    res << { "name" => h_name, "href" => "" }
                end
            end
            res
        end
Build a list from an array of <i>Htmlxxx</i> items. Look up each
 in the AllReferences hash: if we find a corresponding entry,
 we generate a hyperlink to it, otherwise just output the name.
 However, some names potentially need massaging. For example,
 you may require a Ruby file without the .rb extension,
 but the file names we know about may have it. To deal with
 this, we pass in a block which performs the massaging,
 returning an array of alternative names to match