Fix metadoc script showing non-selected extensions
mostly comments `doc += content` -> `doc += innerdoc ` does the fix
This commit is contained in:
parent
6377124f37
commit
9d11e22ab6
|
@ -309,17 +309,19 @@ class ExtensionMetaDocOutputGenerator(OutputGenerator):
|
||||||
|
|
||||||
if ifdef:
|
if ifdef:
|
||||||
if ifdef == 'ifndef':
|
if ifdef == 'ifndef':
|
||||||
if condition != None:
|
if condition:
|
||||||
doc += 'ifndef::' + condition + '[]\n'
|
doc += 'ifndef::' + condition + '[]\n'
|
||||||
doc += innerdoc
|
doc += innerdoc
|
||||||
doc += 'endif::' + condition + '[]\n'
|
doc += 'endif::' + condition + '[]\n'
|
||||||
|
else: # no condition is as if condition is defined; "nothing" is always defined :p
|
||||||
|
pass # so no output
|
||||||
elif ifdef == 'ifdef':
|
elif ifdef == 'ifdef':
|
||||||
if condition != None:
|
if condition:
|
||||||
doc += 'ifdef::' + condition + '+' + extName + '[]\n'
|
doc += 'ifdef::' + condition + '+' + extName + '[]\n'
|
||||||
doc += content + '\n'
|
doc += content + '\n' # does not include innerdoc; the ifdef was merged with the one above
|
||||||
doc += 'endif::' + condition + '+' + extName + '[]\n'
|
doc += 'endif::' + condition + '+' + extName + '[]\n'
|
||||||
else:
|
else: # no condition is as if condition is defined; "nothing" is always defined :p
|
||||||
doc += content + '\n'
|
doc += innerdoc
|
||||||
else: # should be unreachable
|
else: # should be unreachable
|
||||||
self.generator.logMsg('error', 'Logic error in conditionalExt(): ifdef is neither \'ifdef \' nor \'ifndef\'!')
|
self.generator.logMsg('error', 'Logic error in conditionalExt(): ifdef is neither \'ifdef \' nor \'ifndef\'!')
|
||||||
else:
|
else:
|
||||||
|
@ -392,7 +394,7 @@ class ExtensionMetaDocOutputGenerator(OutputGenerator):
|
||||||
write(self.conditionalExt(ext.name, include), file=current_extension_appendices_fp)
|
write(self.conditionalExt(ext.name, include), file=current_extension_appendices_fp)
|
||||||
write(self.conditionalExt(ext.name, link), file=current_extension_appendices_toc_fp)
|
write(self.conditionalExt(ext.name, link), file=current_extension_appendices_toc_fp)
|
||||||
else:
|
else:
|
||||||
condition = ext.supercedingVkVersion if ext.supercedingVkVersion else ext.supercedingExtension
|
condition = ext.supercedingVkVersion if ext.supercedingVkVersion else ext.supercedingExtension # potentially None too
|
||||||
|
|
||||||
write(self.conditionalExt(ext.name, include, 'ifndef', condition), file=current_extension_appendices_fp)
|
write(self.conditionalExt(ext.name, include, 'ifndef', condition), file=current_extension_appendices_fp)
|
||||||
write(self.conditionalExt(ext.name, link, 'ifndef', condition), file=current_extension_appendices_toc_fp)
|
write(self.conditionalExt(ext.name, link, 'ifndef', condition), file=current_extension_appendices_toc_fp)
|
||||||
|
|
Loading…
Reference in New Issue