From ad5e7a0e6f991e923fe94cce444289252304f589 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Sun, 9 Jul 2017 13:51:40 +0300 Subject: [PATCH] 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. --- tools/gen-cpydiff.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/gen-cpydiff.py b/tools/gen-cpydiff.py index 4b273d97f1..86ec816e90 100644 --- a/tools/gen-cpydiff.py +++ b/tools/gen-cpydiff.py @@ -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':