Skip to content

Commit

Permalink
- always try to show doc/hint if available, even if there is no src
Browse files Browse the repository at this point in the history
  • Loading branch information
DisposaBoy committed Jul 11, 2012
1 parent 26db417 commit f673af5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions gsdoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ def run(self, _, mode=''):
elif mode == "hint":
s = []
for d in docs:
src = d.get('src', '').strip()
if src:
name = d.get('name', '')
if name:
kind = d.get('kind', '')
name = d.get('name', '')
pkg = d.get('pkg', '')
if pkg:
name = '%s.%s' % (pkg, name)
doc = '// %s %s\n//\n' % (name, kind)
doc = '%s%s' % (doc, src)
src = d.get('src', '')
if src:
src = '\n//\n%s' % src
doc = '// %s %s%s' % (name, kind, src)

s.append(doc)
doc = '\n\n\n'.join(s).strip()
Expand Down

0 comments on commit f673af5

Please sign in to comment.