parameters: (self, integration_readme, regex_skip_sections_start, regex_skip_sections_end)
return_statement: return integration_content_with_link_inlined
docstring: Goes through a section and remove all reference links it can found.
  
          :param section: An array of lines representing a section.
docstring_summary: Goes through a section and remove all reference links it can found.
docstring_tokens: Goes through a section and remove all reference links it can found .
function: def inline_references(self, integration_readme, regex_skip_sections_start, regex_skip_sections_end):
          """
          Goes through a section and remove all reference links it can found.
  
          :param section: An array of lines representing a section.
          """
  
          skip = False
          all_references = []
          section_without_references = []
          section_with_all_links = []
          regex_bottom_reference_link = r"^\s*\[(\d*?)\]: (\S*)"
  
          # Collecting all references and removing them from section
          # looking at each line, if a line is a reference then we remove it and store the reference.
  
          #section = integration_file.readlines()
          for line in integration_readme.splitlines(True):
              if skip:
                  section_without_references.append(line)
                  if re.search(regex_skip_sections_end, line):
                      skip = False
              elif not skip:
  
                  if re.search(regex_skip_sections_start, line):
                      section_without_references.append(line)
                      skip = True
  
                  elif re.search(regex_bottom_reference_link, line):
  
                      reference = re.search(regex_bottom_reference_link, line)
                      all_references.append([reference.group(1),
                                             reference.group(2)])
                  else:
                      section_without_references.append(line)
  
          # By the end of the for loop skip should always be false otherwise it means that a codeblock is not closed.
          if skip:
              raise ValueError
  
          for line in section_without_references:
              if skip:
                  if re.search(regex_skip_sections_end, line):
                      skip = False
              elif not skip:
                  if re.search(regex_skip_sections_start, line):
                      skip = True
                  else:
                      for reference in all_references:
                          reference_index, reference_val = reference
  
                          curent_link = '][' + reference_index + ']'
  
                          line = line.replace(
                              curent_link, '](' + reference_val + ')')
  
              section_with_all_links.append(line)
  
          # By the end of the for loop skip should always be false otherwise it means that a codeblock is not closed.
          if skip:
              raise ValueError
  
          integration_content_with_link_inlined = ''.join(section_with_all_links)
  
          return integration_content_with_link_inlined
function_tokens: def inline_references ( self , integration_readme , regex_skip_sections_start , regex_skip_sections_end ) : skip = False all_references = [ ] section_without_references = [ ] section_with_all_links = [ ] regex_bottom_reference_link = r"^\s*\[(\d*?)\]: (\S*)" # Collecting all references and removing them from section # looking at each line, if a line is a reference then we remove it and store the reference. #section = integration_file.readlines() for line in integration_readme . splitlines ( True ) : if skip : section_without_references . append ( line ) if re . search ( regex_skip_sections_end , line ) : skip = False elif not skip : if re . search ( regex_skip_sections_start , line ) : section_without_references . append ( line ) skip = True elif re . search ( regex_bottom_reference_link , line ) : reference = re . search ( regex_bottom_reference_link , line ) all_references . append ( [ reference . group ( 1 ) , reference . group ( 2 ) ] ) else : section_without_references . append ( line ) # By the end of the for loop skip should always be false otherwise it means that a codeblock is not closed. if skip : raise ValueError for line in section_without_references : if skip : if re . search ( regex_skip_sections_end , line ) : skip = False elif not skip : if re . search ( regex_skip_sections_start , line ) : skip = True else : for reference in all_references : reference_index , reference_val = reference curent_link = '][' + reference_index + ']' line = line . replace ( curent_link , '](' + reference_val + ')' ) section_with_all_links . append ( line ) # By the end of the for loop skip should always be false otherwise it means that a codeblock is not closed. if skip : raise ValueError integration_content_with_link_inlined = '' . join ( section_with_all_links ) return integration_content_with_link_inlined