adapting caffe2 operator docs generator to pytorch url

Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/10801

Differential Revision: D9472991

Pulled By: ezyang

fbshipit-source-id: 1b8ba77b8255b7e900b6528bd93b3b870f9ba0d4
This commit is contained in:
Wei Wen 2018-10-11 12:38:44 -07:00 committed by Facebook Github Bot
parent eef083e477
commit 666bebc7d2

View file

@ -54,8 +54,8 @@ class GHMarkdown(Markdown):
def getCodeLink(formatter, schema):
formatter = formatter.clone()
path = os.path.join("caffe2", os.path.relpath(schema.file, "caffe2"))
schemaLink = ('https://github.com/caffe2/caffe2/blob/master/{path}'
path = os.path.relpath(schema.file, "caffe2")
schemaLink = ('https://github.com/pytorch/pytorch/blob/master/{path}'
.format(path=path))
formatter.addLink('{path}'.format(path=path), schemaLink)
return formatter.dump()