From 32f2f7f744c4ec15fb7b8ba243bf76c8c9970b26 Mon Sep 17 00:00:00 2001 From: Joe-noh Date: Wed, 3 May 2017 13:23:32 +0900 Subject: [PATCH] use original title if slugified title is empty --- lib/utils/md-renderer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/md-renderer.ts b/lib/utils/md-renderer.ts index 214da611..ca1525ad 100644 --- a/lib/utils/md-renderer.ts +++ b/lib/utils/md-renderer.ts @@ -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 || {};