Static Site Editor adding multiple line breaks
Problem to solve
The markdown to HTML converter used by the Static Site Editor is adding multiple HTML line breaks after the table of contents block. This results in extra, unwanted lines being rendered in the final page/
Example
This page (and many others) https://about.gitlab.com/handbook/product/product-principles/
Note, below the TOC. The raw code looks like this:
{:.no_toc .hidden-md .hidden-lg}
- TOC
{:toc .hidden-md .hidden-lg}
[**Principles**](/handbook/product/product-principles) - [**Processes**](/handbook/product/product-processes) - [**Categorization**](/handbook/product/product-categories) - [**GitLab the Product**](/handbook/product/gitlab-the-product) - [**Being a PM**](/handbook/product/product-manager-role) - [**Performance Indicators**](/handbook/product/performance-indicators/) - [**Leadership**](/handbook/product/product-leadership/)
The SSE converts the file to this:
{:.no_toc .hidden-md .hidden-lg}
* TOC
{:toc .hidden-md .hidden-lg}
<br>
<br>
<br>
[**Principles**](/handbook/product/product-principles) - [**Processes**](/handbook/product/product-processes) - [**Categorization**](/handbook/product/product-categories) - [**GitLab the Product**](/handbook/product/gitlab-the-product) - [**Being a PM**](/handbook/product/product-manager-role) - [**Performance Indicators**](/handbook/product/performance-indicators/) - [**Leadership**](/handbook/product/product-leadership/)
Which results in a rendered page with extra whitespace underneath the search bar, visible in this review app: https://ericschurter-master-patch-83684.about.gitlab-review.app/handbook/product/product-principles/index.html
TODOS
-
@ericschurter: Manual update of 7 markdown files by removing unecessary <br>
tags- Only later if we deem (hear from users) content spacing is needed will we make a handbook CSS follow-up MR
-
@derek-knox: MR for temp this.editorInstance.invoke('setMarkdown', newVal.replace(/\n^<br>$/gm, ''));
solution (!37223 (merged))
Edited by Derek Knox