Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Change ToC script to use <br> instead of trailing spaces

Also updated docs that contain ToC. Fixes #1048
Commit
276393e4e59b8be4c1a5fc14c19749fee3eb28ea
Author
Martin Hořeňovský ·
Parents
c7d9f02d5b72

Files · Download .tar.gz

Changes

 docs/assertions.md           | 10 +++++-----
 docs/command-line.md         | 46 ++++++++++++++++++++++----------------------
 docs/configuration.md        | 18 ++++++++---------
 docs/slow-compiles.md        | 10 +++++-----
 docs/tutorial.md             | 16 +++++++--------
 scripts/updateDocumentToC.py |  8 ++++----
 6 files changed, 54 insertions(+), 54 deletions(-)

diff --git a/docs/assertions.md b/docs/assertions.md
index 66d127bb..3a9d898e 100644
--- a/docs/assertions.md
+++ b/docs/assertions.md
@@ -1,11 +1,11 @@
 <a id="top"></a>
 # Assertion Macros
 
-**Contents**  
-[Natural Expressions](#natural-expressions)  
-[Exceptions](#exceptions)  
-[Matcher expressions](#matcher-expressions)  
-[Thread Safety](#thread-safety)  
+**Contents**<br>
+[Natural Expressions](#natural-expressions)<br>
+[Exceptions](#exceptions)<br>
+[Matcher expressions](#matcher-expressions)<br>
+[Thread Safety](#thread-safety)<br>
 
 Most test frameworks have a large collection of assertion macros to capture all possible conditional forms (```_EQUALS```, ```_NOTEQUALS```, ```_GREATER_THAN``` etc).
 
diff --git a/docs/command-line.md b/docs/command-line.md
index 00d55852..8afcb7d4 100644
--- a/docs/command-line.md
+++ b/docs/command-line.md
@@ -1,29 +1,29 @@
 <a id="top"></a>
 # Command line
 
-**Contents**  
-[Specifying which tests to run](#specifying-which-tests-to-run)  
-[Choosing a reporter to use](#choosing-a-reporter-to-use)  
-[Breaking into the debugger](#breaking-into-the-debugger)  
-[Showing results for successful tests](#showing-results-for-successful-tests)  
-[Aborting after a certain number of failures](#aborting-after-a-certain-number-of-failures)  
-[Listing available tests, tags or reporters](#listing-available-tests-tags-or-reporters)  
-[Sending output to a file](#sending-output-to-a-file)  
-[Naming a test run](#naming-a-test-run)  
-[Eliding assertions expected to throw](#eliding-assertions-expected-to-throw)  
-[Make whitespace visible](#make-whitespace-visible)  
-[Warnings](#warnings)  
-[Reporting timings](#reporting-timings)  
-[Load test names to run from a file](#load-test-names-to-run-from-a-file)  
-[Just test names](#just-test-names)  
-[Specify the order test cases are run](#specify-the-order-test-cases-are-run)  
-[Specify a seed for the Random Number Generator](#specify-a-seed-for-the-random-number-generator)  
-[Identify framework and version according to the libIdentify standard](#identify-framework-and-version-according-to-the-libidentify-standard)  
-[Wait for key before continuing](#wait-for-key-before-continuing)  
-[Specify multiples of clock resolution to run benchmarks for](#specify-multiples-of-clock-resolution-to-run-benchmarks-for)  
-[Usage](#usage)  
-[Specify the section to run](#specify-the-section-to-run)  
-[Filenames as tags](#filenames-as-tags)  
+**Contents**<br>
+[Specifying which tests to run](#specifying-which-tests-to-run)<br>
+[Choosing a reporter to use](#choosing-a-reporter-to-use)<br>
+[Breaking into the debugger](#breaking-into-the-debugger)<br>
+[Showing results for successful tests](#showing-results-for-successful-tests)<br>
+[Aborting after a certain number of failures](#aborting-after-a-certain-number-of-failures)<br>
+[Listing available tests, tags or reporters](#listing-available-tests-tags-or-reporters)<br>
+[Sending output to a file](#sending-output-to-a-file)<br>
+[Naming a test run](#naming-a-test-run)<br>
+[Eliding assertions expected to throw](#eliding-assertions-expected-to-throw)<br>
+[Make whitespace visible](#make-whitespace-visible)<br>
+[Warnings](#warnings)<br>
+[Reporting timings](#reporting-timings)<br>
+[Load test names to run from a file](#load-test-names-to-run-from-a-file)<br>
+[Just test names](#just-test-names)<br>
+[Specify the order test cases are run](#specify-the-order-test-cases-are-run)<br>
+[Specify a seed for the Random Number Generator](#specify-a-seed-for-the-random-number-generator)<br>
+[Identify framework and version according to the libIdentify standard](#identify-framework-and-version-according-to-the-libidentify-standard)<br>
+[Wait for key before continuing](#wait-for-key-before-continuing)<br>
+[Specify multiples of clock resolution to run benchmarks for](#specify-multiples-of-clock-resolution-to-run-benchmarks-for)<br>
+[Usage](#usage)<br>
+[Specify the section to run](#specify-the-section-to-run)<br>
+[Filenames as tags](#filenames-as-tags)<br>
 
 Catch works quite nicely without any command line options at all - but for those times when you want greater control the following options are available.
 Click one of the followings links to take you straight to that option - or scroll on to browse the available options.
diff --git a/docs/configuration.md b/docs/configuration.md
index bbb27ac0..56d2327b 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -1,15 +1,15 @@
 <a id="top"></a>
 # Compile-time configuration
 
-**Contents**
-[main()/ implementation](#main-implementation)
-[Prefixing Catch macros](#prefixing-catch-macros)
-[Terminal colour](#terminal-colour)
-[Console width](#console-width)
-[stdout](#stdout)
-[Other toggles](#other-toggles)
-[Windows header clutter](#windows-header-clutter)
-[Enabling stringification](#enabling-stringification)
+**Contents**<br>
+[main()/ implementation](#main-implementation)<br>
+[Prefixing Catch macros](#prefixing-catch-macros)<br>
+[Terminal colour](#terminal-colour)<br>
+[Console width](#console-width)<br>
+[stdout](#stdout)<br>
+[Other toggles](#other-toggles)<br>
+[Windows header clutter](#windows-header-clutter)<br>
+[Enabling stringification](#enabling-stringification)<br>
 
 Catch is designed to "just work" as much as possible. For most people the only configuration needed is telling Catch which source file should host all the implementation code (```CATCH_CONFIG_MAIN```).
 
diff --git a/docs/slow-compiles.md b/docs/slow-compiles.md
index 9696757d..0853b661 100644
--- a/docs/slow-compiles.md
+++ b/docs/slow-compiles.md
@@ -1,11 +1,11 @@
 <a id="top"></a>
 # Why do my tests take so long to compile?
 
-**Contents**  
-[Short answer](#short-answer)  
-[Long answer](#long-answer)  
-[Practical example](#practical-example)  
-[Other possible solutions](#other-possible-solutions)  
+**Contents**<br>
+[Short answer](#short-answer)<br>
+[Long answer](#long-answer)<br>
+[Practical example](#practical-example)<br>
+[Other possible solutions](#other-possible-solutions)<br>
 
 Several people have reported that test code written with Catch takes much longer to compile than they would expect. Why is that?
 
diff --git a/docs/tutorial.md b/docs/tutorial.md
index ebc20fd2..1b55bcf1 100644
--- a/docs/tutorial.md
+++ b/docs/tutorial.md
@@ -1,14 +1,14 @@
 <a id="top"></a>
 # Tutorial
 
-**Contents**  
-[Getting Catch](#getting-catch)  
-[Where to put it?](#where-to-put-it)  
-[Writing tests](#writing-tests)  
-[Test cases and sections](#test-cases-and-sections)  
-[BDD-Style](#bdd-style)  
-[Scaling up](#scaling-up)  
-[Next steps](#next-steps)  
+**Contents**<br>
+[Getting Catch](#getting-catch)<br>
+[Where to put it?](#where-to-put-it)<br>
+[Writing tests](#writing-tests)<br>
+[Test cases and sections](#test-cases-and-sections)<br>
+[BDD-Style](#bdd-style)<br>
+[Scaling up](#scaling-up)<br>
+[Next steps](#next-steps)<br>
 
 ## Getting Catch
 
diff --git a/scripts/updateDocumentToC.py b/scripts/updateDocumentToC.py
index b1ab6dd2..948e5e1d 100644
--- a/scripts/updateDocumentToC.py
+++ b/scripts/updateDocumentToC.py
@@ -30,7 +30,7 @@ headingExcludeRelease = [2,3,4,5]  # use level 1 headers for release-notes.md
 documentsDefault = os.path.join(os.path.relpath(catchPath), 'docs/*.md')
 releaseNotesName = 'release-notes.md'
 
-contentTitle = '**Contents**  '
+contentTitle = '**Contents**'
 contentLineNo = 4
 contentLineNdx = contentLineNo - 1
 
@@ -210,14 +210,14 @@ def createToc(headlines, hyperlink=True, top_link=False, no_toc_header=False):
     if not no_toc_header:
         if top_link:
             processed.append('<a class="mk-toclify" id="table-of-contents"></a>\n')
-        processed.append(contentTitle)
+        processed.append(contentTitle + '<br>')
 
     for line in headlines:
         if hyperlink:
-            item = '[%s](#%s)  ' % (line[0], line[1])
+            item = '[%s](#%s)' % (line[0], line[1])
         else:
             item = '%s- %s' % ((line[2]-1)*'    ', line[0])
-        processed.append(item)
+        processed.append(item + '<br>')
     processed.append('\n')
     return processed