def versions_at_headings(heading_re)
      sections(heading_re).each_with_object({}) do |(heading, text), versions|
        tokens = heading.gsub(/[\[\]\(\)`]/, " ").split(/[[:space:]]/)
        tokens = tokens.map(&:strip)
        version = tokens.find { |t| t.version? }
        text_with_references = [text, link_references].join("\n\n")
        versions[version.version_number] = text_with_references if version
      end
    end
def versions_at_headings(heading_re)
      sections(heading_re).each_with_object({}) do |(heading, text), versions|
        tokens = heading.gsub(/[\[\]\(\)`]/, " ").split(/[[:space:]]/)
        tokens = tokens.map(&:strip)
        version = tokens.find { |t| t.version? }
        text_with_references = [text, link_references].join("\n\n")
        versions[version.version_number] = text_with_references if version
      end
    end
rubocop:disable Style/SymbolProc