From 95f7681fee631772e9f151be0765ac0feaab1395 Mon Sep 17 00:00:00 2001 From: Roman Hotsiy Date: Wed, 3 May 2017 11:00:49 +0300 Subject: [PATCH] chore: add comment --- lib/utils/md-renderer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/md-renderer.ts b/lib/utils/md-renderer.ts index ca1525ad..bdb5890f 100644 --- a/lib/utils/md-renderer.ts +++ b/lib/utils/md-renderer.ts @@ -53,6 +53,7 @@ export class MdRenderer { } saveHeading(title: string, parent:MarkdownHeading = {id:null, children: this.headings}) :MarkdownHeading { + // if title contains some non-ASCII characters (e.g. chinese) slugify returns empty string let slug = slugify(title) || title; let id = slug; if (parent && parent.id) id = `${parent.id}/${id}`;