docs: def get_url_repair_patterns():
      """Initialise and return a list of precompiled regexp patterns that
         are used to try to re-assemble URLs that have been broken during
         a document's conversion to plain-text.
         @return: (list) of compiled re regexp patterns used for finding
          various broken URLs.
      """
      file_types_list = [
          ur'h\s*t\s*m',          # htm
          ur'h\s*t\s*m\s*l',      # html
          ur't\s*x\s*t'           # txt
          ur'p\s*h\s*p'           # php
          ur'a\s*s\s*p\s*'        # asp
          ur'j\s*s\s*p',          # jsp
          ur'p\s*y',              # py (python)
          ur'p\s*l',              # pl (perl)
          ur'x\s*m\s*l',          # xml
          ur'j\s*p\s*g',          # jpg
          ur'g\s*i\s*f'           # gif
          ur'm\s*o\s*v'           # mov
          ur's\s*w\s*f'           # swf
          ur'p\s*d\s*f'           # pdf
          ur'p\s*s'               # ps
          ur'd\s*o\s*c',          # doc
          ur't\s*e\s*x',          # tex
          ur's\s*h\s*t\s*m\s*l',  # shtml
      ]
  
      pattern_list = [
          ur'(h\s*t\s*t\s*p\s*\:\s*\/\s*\/)',
          ur'(f\s*t\s*p\s*\:\s*\/\s*\/\s*)',
          ur'((http|ftp):\/\/\s*[\w\d])',
          ur'((http|ftp):\/\/([\w\d\s\._\-])+?\s*\/)',
          ur'((http|ftp):\/\/([\w\d\_\.\-])+\/(([\w\d\_\s\.\-])+?\/)+)',
          ur'((http|ftp):\/\/([\w\d\_\.\-])+\/(([\w\d\_\s\.\-])+?\/)*([\w\d\_\s\-]+\.\s?[\w\d]+))',
      ]
      pattern_list = [re.compile(p, re.I | re.UNICODE) for p in pattern_list]
  
      # some possible endings for URLs:
      p = ur'((http|ftp):\/\/([\w\d\_\.\-])+\/(([\w\d\_\.\-])+?\/)*([\w\d\_\-]+\.%s))'
      for extension in file_types_list:
          p_url = re.compile(p % extension, re.I | re.UNICODE)
          pattern_list.append(p_url)
  
      # if url last thing in line, and only 10 letters max, concat them
      p_url = re.compile(
          r'((http|ftp):\/\/([\w\d\_\.\-])+\/(([\w\d\_\.\-])+?\/)*\s*?([\w\d\_\.\-]\s?){1,10}\s*)$',
          re.I | re.UNICODE)
      pattern_list.append(p_url)
  
      return pattern_list