Markdown Lists on the Wiki with more than 3 indents are being corrupted/missing

Summary

On the Wiki, using Markdown, lists with items that have more than 3 indents are being corrupted/missing.

Steps to reproduce

Using the following markdown list as a table of contents.

* [Infrastructure](Infrastructure/index)
	* [AWS](Infrastructure/AWS/index)
		* [Elastic Beanstalk](Infrastructure/AWS/Elastic Beanstalk/index)
			* [Apache](Infrastructure/AWS/Elastic Beanstalk/Apache/index)
				* [Checking](Infrastructure/AWS/Elastic Beanstalk/Apache/Checking)
				* [DataDog](Infrastructure/AWS/Elastic Beanstalk/Apache/DataDog)
				* [Logs](Infrastructure/AWS/Elastic Beanstalk/Apache/Logs/index)
					* [Proxy](Infrastructure/AWS/Elastic Beanstalk/Apache/Logs/Proxy)
				* [Tuning](Infrastructure/AWS/Elastic Beanstalk/Apache/Tuning/index)
					* [Bees with machine guns](Infrastructure/AWS/Elastic Beanstalk/Apache/Tuning/Bees with machine guns)
			* [Hooks](Infrastructure/AWS/Elastic Beanstalk/Hooks)

What is the current bug behavior?

The structure, <ul> and <li> tags, appears to be correct but with the following problems.

  1. The Checking, DataDog, Logs and Tuning list items are missing the text before the closing </a> tag. This results in a link that has no text and can't be clicked.

  2. The Proxy and Bees with machine guns list items are completely missing the <a> tag. This results in no link at all.

Extract of the generated HTML on the Wiki.

<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/index">Infrastructure</a>&#x000A;&#x000A;
	<ul>&#x000A;
		<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/index">AWS</a>&#x000A;&#x000A;
			<ul>&#x000A;
				<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/index">Elastic Beanstalk</a>&#x000A;&#x000A;
					<ul>&#x000A;
						<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/index">Apache</a>&#x000A;&#x000A;
							<ul>&#x000A;
								<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Checking"></a></li>&#x000A;
								<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/DataDog"></a></li>&#x000A;
								<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Logs/index"></a>&#x000A;&#x000A;
									<ul>&#x000A;
										<li>&#x000A;</li>&#x000A;
									</ul>&#x000A;
								</li>&#x000A;
								<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Tuning/index"></a>&#x000A;&#x000A;
									<ul>&#x000A;
										<li>&#x000A;</li>&#x000A;
									</ul>&#x000A;
								</li>&#x000A;
							</ul>&#x000A;
						</li>&#x000A;
						<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Hooks">Hooks</a></li>&#x000A;
					</ul>&#x000A;
				</li>&#x000A;
			</ul>&#x000A;
		</li>&#x000A;
	</ul>&#x000A;
</li>&#x000A;

What is the expected correct behavior?

The generated HTML on the Wiki should be

<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/index">Infrastructure</a>&#x000A;&#x000A;
	<ul>&#x000A;
		<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/index">AWS</a>&#x000A;&#x000A;
			<ul>&#x000A;
				<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/index">Elastic Beanstalk</a>&#x000A;&#x000A;
					<ul>&#x000A;
						<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/index">Apache</a>&#x000A;&#x000A;
							<ul>&#x000A;
								<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Checking">Checking</a></li>&#x000A;
								<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/DataDog">DataDog</a></li>&#x000A;
								<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Logs/index">Logs</a>&#x000A;&#x000A;
									<ul>&#x000A;
										<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Logs/Proxy">Proxy</a></li>&#x000A;
									</ul>&#x000A;
								</li>&#x000A;
								<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Tuning/index">Tuning</a>&#x000A;&#x000A;
									<ul>&#x000A;
										<li>&#x000A;<a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Apache/Tuning/Bees%20with%20machine%20guns">Bees with machine guns</a></li>&#x000A;
									</ul>&#x000A;
								</li>&#x000A;
							</ul>&#x000A;
						</li>&#x000A;
						<li><a href="/user_name/project_name/wikis/Infrastructure/AWS/Elastic%20Beanstalk/Hooks">Hooks</a></li>&#x000A;
					</ul>&#x000A;
				</li>&#x000A;
			</ul>&#x000A;
		</li>&#x000A;
	</ul>&#x000A;
</li>&#x000A;

Relevant logs and/or screenshots

Actual Result

wiki_bug_-_actual

Expected Result

wiki_bug_-_expected

Output of checks

This bug happens on GitLab.com

Edited by Neal Webster