Skip to content

Commit

Permalink
fix invalid hrefs pointed to by #1498 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
gfwilliams committed Oct 17, 2018
1 parent 066cd08 commit 4f75809
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions scripts/build_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ def add_link(jsondata):
html(' <div id="contents">')
html(" <h2><a name=\"contents\"></a>Contents</h2>")
html(" <ul>")
html(" <li><a class=\"blush\" name=\"t__global\" href=\"#_global\" onclick=\"place('_global');\">Globals</A></li>")
html(" <li><a class=\"blush\" name=\"t__global\" href=\"#_global\" onclick=\"place('_global');\">Globals</a></li>")
for jsondata in jsondatas:
if "name" in jsondata and not "class" in jsondata:
add_link(jsondata)
Expand Down Expand Up @@ -289,6 +289,7 @@ def add_link(jsondata):
niceName="Globals"
linkName="_global"

# If we're on to a different class now, put up the heading for it
if className!=lastClass:
lastClass=className
html("<h2 class=\"class\"><a class=\"blush\" name=\""+linkName+"\" href=\"#t_"+linkName+"\" onclick=\"place('t_"+linkName+"');\">"+niceName+"</a></h2>")
Expand All @@ -313,10 +314,12 @@ def add_link(jsondata):
html(" <h4>Methods and Fields</h4>")
html(" <ul>")
for j in jsondatas:
if ("name" in j) and (className!="" or not "instanceof" in j) and ((className=="" and not "class" in j) or ("class" in j and j["class"]==className)):
if ("name" in j) and ((className=="" and not "class" in j) or ("class" in j and j["class"]==className)):
link = get_link(j)
html(" <li><a name=\"t_"+link+"\" href=\"#"+link+"\">"+get_surround(j)+"</a></li>")
html(" </ul>")

# Otherwise just output detail
link = get_link(jsondata)
html(" <h3 class=\"detail\"><a class=\"blush\" name=\""+link+"\" href=\"#t_"+link+"\" onclick=\"place('t_"+link+"','"+linkName+"');\">"+get_fullname(jsondata)+"</a>")
#html("<!-- "+json.dumps(jsondata, sort_keys=True, indent=2)+"-->");
Expand Down

0 comments on commit 4f75809

Please sign in to comment.