diff --git a/lib/utils/md-renderer.ts b/lib/utils/md-renderer.ts index 214da61145..bdb5890f82 100644 --- a/lib/utils/md-renderer.ts +++ b/lib/utils/md-renderer.ts @@ -53,7 +53,8 @@ export class MdRenderer { } saveHeading(title: string, parent:MarkdownHeading = {id:null, children: this.headings}) :MarkdownHeading { - let slug = slugify(title); + // 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}`; parent.children = parent.children || {};