Skip to content

Commit

Permalink
add more
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen committed Jul 31, 2015
1 parent 9d4397a commit 387339b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion doc/guide.md
Expand Up @@ -62,7 +62,7 @@ Rabit provides different reduction operators, for example, if you change ```op:
the reduction operation will be a summation, and the result will become ```a = {1, 3, 5}```.
You can also run the example with different processes by setting -n to different values.

If you are more familiar with python, you can also use rabit in python. The same example as before can be found in [basic.py](basic.py):
If you are more familiar with python, you can also use rabit in python. The same example as before can be found in [basic.py](../guide/basic.py):

```python
import numpy as np
Expand Down
8 changes: 7 additions & 1 deletion doc/sphinx_util.py
Expand Up @@ -14,13 +14,19 @@

class MarkdownParser(parser.CommonMarkParser):
github_doc_root = None
doc_suffix = set(['md', 'rst'])

@staticmethod
def remap_url(url):
if MarkdownParser.github_doc_root is None or url is None:
return url
if url.startswith('#'):
return url
arr = url.split('#', 1)
if arr[0].endswith('.md') and arr[0].find('://') == -1:
ssuffix = arr[0].rsplit('.', 1)

if len(ssuffix) == 2 and (ssuffix[-1] in MarkdownParser.doc_suffix
and arr[0].find('://') == -1):
arr[0] = arr[0][:-3] + '.html'
return '#'.join(arr)
else:
Expand Down

0 comments on commit 387339b

Please sign in to comment.