tools/gen-cpydiff: Use case description as 3rd-level heading.

This is required to easily giving links to a particular difference case.
Also, add RST anchors to allow cases to cross-reference each other.
This commit is contained in:
Paul Sokolovsky 2017-07-09 13:51:40 +03:00
parent 5f65ad8c96
commit ad5e7a0e6f

View File

@ -185,7 +185,9 @@ def gen_rst(results):
rst.write(RSTCHARS[min(i, len(RSTCHARS)-1)] * len(section[i]))
rst.write('\n\n')
class_ = section
rst.write('**' + output.desc + '**\n\n')
rst.write('.. _cpydiff_%s:\n\n' % output.name.rsplit('.', 1)[0])
rst.write(output.desc + '\n')
rst.write('~' * len(output.desc) + '\n\n')
if output.cause != 'Unknown':
rst.write('**Cause:** ' + output.cause + '\n\n')
if output.workaround != 'Unknown':