diff options
| author | Martin Hořeňovský | 2017-10-13 11:14:37 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2017-10-13 11:17:38 +0200 |
| commit | 276393e4e59b8be4c1a5fc14c19749fee3eb28ea (patch) | |
| tree | e1d4f747baec0ba30d4b8bfa7014853265524d70 /scripts | |
| parent | c7d9f02d5b723183fb170209e740c7c097c2af04 (diff) | |
| download | catch3-276393e4e59b8be4c1a5fc14c19749fee3eb28ea.tar.gz | |
Change ToC script to use <br> instead of trailing spaces
Also updated docs that contain ToC. Fixes #1048
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/updateDocumentToC.py | 8 |
1 files changed, 4 insertions, 4 deletions
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 |