From 7dce3857dd87e256bbdfba7cde6b9dcfb5b3d2e4 Mon Sep 17 00:00:00 2001 From: Ciprian Dorin Craciun Date: Fri, 29 Jun 2018 12:01:04 +0300 Subject: [PATCH] [documentation] Minor fixup [#95] --- sources/tools_documentation.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sources/tools_documentation.rs b/sources/tools_documentation.rs index 0af5205d..1b7764e4 100644 --- a/sources/tools_documentation.rs +++ b/sources/tools_documentation.rs @@ -961,7 +961,11 @@ pub fn dump_cmark (libraries : Libraries, stream : &mut dyn io::Write) -> (Outco try_writeln! (stream); for appendix in library.appendices () { let appendix_anchor = try! (generate_anchor (Some ("appendix"), Some (library.identifier ()), Some (appendix.identifier ()))); - try_writeln! (stream, "* [`{}`](#{});", appendix.identifier (), appendix_anchor); + if let Some (title) = appendix.title () { + try_writeln! (stream, "* [`{}`](#{}) -- {};", appendix.identifier (), appendix_anchor, title); + } else { + try_writeln! (stream, "* [`{}`](#{});", appendix.identifier (), appendix_anchor); + } } try_writeln! (stream);