From b6de9a0091ab6a7414b46c7eb50f25b9512fb455 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Mon, 15 Mar 2021 12:48:20 -0400 Subject: Test Doc System (#1754) * #include an absolute path didn't work - because paths were taken to always be relative. * Use capability system in docs. Simplify how requirements/availability is produced. * Small fixes in output of availablity. * Updated stdlib doc. * Small improvements. * Added doc test type. Improved readability of straight .md text Made -doc option output to diagnostic stream. * Add test for checking requirements info is correctly extracted. Co-authored-by: Tim Foley --- source/slang/slang-doc-markdown-writer.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'source/slang/slang-doc-markdown-writer.cpp') diff --git a/source/slang/slang-doc-markdown-writer.cpp b/source/slang/slang-doc-markdown-writer.cpp index 5105b0b26..c2bc05dbb 100644 --- a/source/slang/slang-doc-markdown-writer.cpp +++ b/source/slang/slang-doc-markdown-writer.cpp @@ -830,6 +830,8 @@ void DocMarkdownWriter::writeCallableOverridable(const DocMarkup::Entry& entry, _appendAsBullets(_getUniqueParams(genericDecls), '`'); // And parameters _appendAsBullets(_getUniqueParams(paramDecls), '`'); + + out << toSlice("\n"); } } } @@ -1034,8 +1036,9 @@ void DocMarkdownWriter::writeAggType(const DocMarkup::Entry& entry, AggTypeDeclB if (params.getCount()) { - out << "## Generic Parameters\n\n"; + out << toSlice("## Generic Parameters\n\n"); _appendAsBullets(_getAsNameAndTextList(params), '`'); + out << toSlice("\n"); } } @@ -1044,9 +1047,9 @@ void DocMarkdownWriter::writeAggType(const DocMarkup::Entry& entry, AggTypeDeclB _getDeclsOfType(aggTypeDecl, fields); if (fields.getCount()) { - out << "## Fields\n\n"; - + out << toSlice("## Fields\n\n"); _appendAsBullets(_getAsNameAndTextList(fields), '`'); + out << toSlice("\n"); } } @@ -1072,6 +1075,7 @@ void DocMarkdownWriter::writeAggType(const DocMarkup::Entry& entry, AggTypeDeclB out << "## Methods\n\n"; _appendAsBullets(_getAsStringList(uniqueMethods), '`'); + out << toSlice("\n"); } } } @@ -1081,7 +1085,8 @@ void DocMarkdownWriter::writePreamble(const DocMarkup::Entry& entry) SLANG_UNUSED(entry); auto& out = m_builder; - out << toSlice("\n"); + //out << toSlice("\n"); + out.appendRepeatedChar('-', 80); out << toSlice("\n"); } -- cgit v1.2.3