diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2017-02-10 17:30:23 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-02-10 17:43:20 -0800 |
commit | 83c857f34d907ff8c696a25ec4a3f47e38e2fb40 (patch) | |
tree | 15ccdd4b3a3f48eedf9c5c7441afa5ab800bda97 | |
parent | 371c353f037aa765706efe13778744f4135e791b (diff) |
Only modify non-.md files in doc processing.
Change: 147218795
-rw-r--r-- | tensorflow/tools/docs/substitute_links.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/tools/docs/substitute_links.py b/tensorflow/tools/docs/substitute_links.py index 698bee7fba..848aa6d186 100644 --- a/tensorflow/tools/docs/substitute_links.py +++ b/tensorflow/tools/docs/substitute_links.py @@ -61,6 +61,10 @@ def _main(input_dir, output_dir): full_in_path = os.path.join(dirpath, base_name) suffix = os.path.relpath(path=full_in_path, start=input_dir) full_out_path = os.path.join(output_dir, suffix) + if not base_name.endswith('.md'): + print('Copying non-md file %s...' % suffix) + open(full_out_path, 'w').write(open(full_in_path).read()) + continue if dirpath.endswith('/api_guides/python'): print('Processing Python guide %s...' % base_name) md_string = tag_updater.process(full_in_path) |