Commit 887eff13 authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Fix generation of mkdocs.yml

parent 98362273
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -139,7 +139,14 @@ def writeClausesMkDocs(document:Document, filename:str, navTitle:str, addNavTitl

			# TODO handle if the next clause is more than one level deeper

			# Reformat the title to be valid for YAML (remove all markdown marks like italic/bold/etc. )
			_title = f.title.replace("'", '"')
			_title = _title.replace("**", "")
			_title = _title.replace("*", "")
			_title = _title.replace("__", "")
			_title = _title.replace("~~", "")


			nextClause = document.clauses[i+1] if i+1 < len(document.clauses) else None
			if nextClause is None or nextClause.level <= f.level:
				file.write(f"{indentation}{'  '*f.level}- '{_title}': '{navTitle}/{f.clauseNumber}.md'\n")