fix: crash in MarkdownRenderer on non-string

This commit is contained in:
Roman Hotsiy 2018-02-08 00:50:26 +02:00
parent b95f665526
commit dead16199f
No known key found for this signature in database
GPG Key ID: 5CB7B3ACABA57CB0

View File

@ -129,9 +129,7 @@ export class MarkdownRenderer {
md.renderer.rules.heading_close = this.headingCloseRule;
}
const text = rawText;
const res = md.render(text);
const res = md.render(rawText.toString());
if (!raw) {
this.restoreOrigRules();