mirror of
https://github.com/Redocly/redoc.git
synced 2025-08-06 05:10:20 +03:00
use original title if slugified title is empty
This commit is contained in:
parent
0341db4559
commit
32f2f7f744
|
@ -53,7 +53,7 @@ export class MdRenderer {
|
|||
}
|
||||
|
||||
saveHeading(title: string, parent:MarkdownHeading = {id:null, children: this.headings}) :MarkdownHeading {
|
||||
let slug = slugify(title);
|
||||
let slug = slugify(title) || title;
|
||||
let id = slug;
|
||||
if (parent && parent.id) id = `${parent.id}/${id}`;
|
||||
parent.children = parent.children || {};
|
||||
|
|
Loading…
Reference in New Issue
Block a user