Skip to content

Commit c0e4e37

Browse files
authored
Merge pull request #2025 from daspecster/fix-doc-line-linking
Fix doc line linking
2 parents b271b76 + 016921f commit c0e4e37

File tree

3 files changed

+28
-4
lines changed

3 files changed

+28
-4
lines changed

docs/json/toc-all.json

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,16 @@
371371
"title": "ManagedZone"
372372
}
373373
]
374-
}, {
374+
},{
375+
"title": "Error Reporting",
376+
"type": "gcloud/error_reporting",
377+
"nav": [
378+
{
379+
"type": "gcloud/error_reporting/client/client",
380+
"title": "Client"
381+
}
382+
]
383+
},{
375384
"title": "Exceptions",
376385
"type": "gcloud/exceptions",
377386
"nav": [

docs/json/toc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,15 @@
171171
"title": "Change Sets"
172172
}
173173
]
174+
},{
175+
"title": "Error Reporting",
176+
"type": "gcloud/error_reporting",
177+
"nav": [
178+
{
179+
"type": "gcloud/error_reporting/client/client",
180+
"title": "Client"
181+
}
182+
]
174183
}, {
175184
"title": "Exceptions",
176185
"type": "gcloud/exceptions",

scripts/generate_json_docs.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424

2525
from verify_included_modules import get_public_modules
2626

27+
import gcloud
28+
29+
ABSOLUTE_LIBRARY_PATH = os.path.dirname(os.path.dirname(os.path.abspath(
30+
gcloud.__file__)))
31+
2732

2833
class Module(object):
2934

@@ -290,10 +295,10 @@ def build_type(type_id, title, contents):
290295

291296
def clean_source_path(source):
292297
source_path = ''
293-
if 'gcloud-python' in source:
294-
source_path = source.split('gcloud-python')[1]
298+
if ABSOLUTE_LIBRARY_PATH in source:
299+
source_path = source.replace(ABSOLUTE_LIBRARY_PATH, source)
295300

296-
return source_path[1:]
301+
return source_path
297302

298303

299304
def process_code_blocks(doc):
@@ -552,6 +557,7 @@ def main():
552557
'credentials': [],
553558
'datastore': [],
554559
'dns': [],
560+
'error_reporting': [],
555561
'environment_vars': [],
556562
'exceptions': [],
557563
'iterator': [],

0 commit comments

Comments
 (0)