Skip to content
This repository has been archived by the owner on Feb 28, 2022. It is now read-only.

Commit

Permalink
Add @ check for return type (#54)
Browse files Browse the repository at this point in the history
* Add @ check for return type

* Update setup.py
  • Loading branch information
yannanwang1 authored and bianliu1013 committed Jul 7, 2017
1 parent 2bb55be commit ea27c02
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions docfx_yaml/monkeypatch.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,9 @@ def extract_exception_desc(field_object):
if returntype_ret:
# Support or in returntype
for returntype in returntype_ret.split(' or '):
# Strip '\n' '\t' ''
returntype = returntype.strip()[1:]
# Remove @ and \n for cross reference in return type to apply to docfx correctly
if returntype.startswith('@'):
returntype = returntype[1:].rstrip('\n')
data['return'].setdefault('type', []).append(returntype)
if fieldtype.name == 'returnvalue':
returnvalue_ret = transform_node(content[1][0])
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

setup(
name='sphinx-docfx-yaml',
version='1.2.13',
version='1.2.14',
author='Eric Holscher',
author_email='eric@ericholscher.com',
url='https://github.com/ericholscher/sphinx-docfx-yaml',
Expand Down

0 comments on commit ea27c02

Please sign in to comment.