parameters: (self, content)
return_statement: return content
docstring: Fix the path of the links in nav file
docstring_summary: Fix the path of the links in nav file
docstring_tokens: Fix the path of the links in nav file
function: def _fix_nav_css_links(self, content):
          """
          Fix the path of the links in nav file
          """
  
          root = ebooklib.utils.parse_string(content)
          for element in root.iter('{%s}link' % NAMESPACES['XHTML']):
              href = urllib.unquote(element.get('href'))
  
              if href.startswith('../%s' % STYLES_DIR):
                  file_name = os.path.basename(href)
                  element.set(
                      'href', '{}/{}'.format(STYLES_DIR, file_name))
  
          content = etree.tostring(
              root, pretty_print=True, encoding='utf-8', xml_declaration=True)
          return content
function_tokens: def _fix_nav_css_links ( self , content ) : root = ebooklib . utils . parse_string ( content ) for element in root . iter ( '{%s}link' % NAMESPACES [ 'XHTML' ] ) : href = urllib . unquote ( element . get ( 'href' ) ) if href . startswith ( '../%s' % STYLES_DIR ) : file_name = os . path . basename ( href ) element . set ( 'href' , '{}/{}' . format ( STYLES_DIR , file_name ) ) content = etree . tostring ( root , pretty_print = True , encoding = 'utf-8' , xml_declaration = True ) return content