parameters: (path, filetype)
return_statement: return path
docstring: Returns path with extension html if original extension is md or rst or
      if filetype is markdown and path has no extension at all.
docstring_summary: Returns path with extension html if original extension is md or rst or
      if filetype is markdown and path has no extension at all.
docstring_tokens: Returns path with extension html if original extension is md or rst or if filetype is markdown and path has no extension at all .
function: def get_html_path(path, filetype):
      """
      Returns path with extension html if original extension is md or rst or
      if filetype is markdown and path has no extension at all.
      """
      basepath, ext = os.path.splitext(path)
      if ext in ('.md', '.rst') or (filetype == 'md' and ext == '' and not basepath.endswith('/')):
          return basepath + '.html'
      return path
function_tokens: def get_html_path ( path , filetype ) : basepath , ext = os . path . splitext ( path ) if ext in ( '.md' , '.rst' ) or ( filetype == 'md' and ext == '' and not basepath . endswith ( '/' ) ) : return basepath + '.html' return path