Skip to content

Commit 60cf775

Browse files
authored
Include generated version notes in API reference pages (#725)
* Include generated version notes in API reference pages Change the range of text copied into the API entry point reference pages so as to include the generated version notes. Closes #724 * Handle the fallback case for when there is no parameter section
1 parent f7a7e47 commit 60cf775

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

scripts/genRef.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,12 @@ def emitPage(baseDir, specDir, pi, file):
393393
logWarn('emitPage:', pageName, 'INCLUDE is None, no page generated')
394394
return
395395

396-
# Specification text
397-
lines = remapIncludes(file[pi.begin:pi.include + 1], baseDir, specDir)
396+
# Specification text from beginning to just before the parameter
397+
# section. This covers the description, the prototype, the version
398+
# note, and any additional version note text. If a parameter section
399+
# is absent then go a line beyond the include.
400+
remap_end = pi.include + 1 if pi.param is None else pi.param
401+
lines = remapIncludes(file[pi.begin:remap_end], baseDir, specDir)
398402
specText = ''.join(lines)
399403

400404
if pi.param is not None:

0 commit comments

Comments
 (0)