"Failed to render Markdown" after import from markdown

Bug report

’Failed to render Markdown: “version” is a required argument’

I’m new to Inkdrop and wanted to explore by importing from my store of mardown files.

I’ imported about a dozen markdown files with .md extensions (which I’ve been editing fine in other apps such as Typora and Notable). The files do have YAML headers. When I import into Inkdrop I see I get the above error message on a few of the imported files.

When I check Developer -> Toggle Developer Tools I see:

`C:\Users\jconn\AppDa…g\src\common.js:114 app:error Failed to render preview: +6m Error: “version” is a required argument.

debug @ C:\Users\jconn\AppDa…g\src\common.js:114
(anonymous) @ browser-commons.js:1

`
Also, on two separate occasions after an import, rather than see this rendering error I instead had what seemed like a new Inkdrop window open but no notes displayed and the app seemingly not responding (but I believe allowing me to close).

Info

  • Platform: Windows
  • Platform version: 10
  • App Version: (5.0.0)

Reproduce

I chose: _File, _Import from Markdown Files,
and then chose all the markdown files from a windows folder.

There was nothing special about the files that fail to render. Plain text markdown files with a YAML header. Here is the first part of an example file which is triggering the error:

`

title: read_BubbJLE13
tags: [DevII, enclosure, read_notes]
created: ‘2020-02-19T15:41:05.620Z’
modified: ‘2020-07-10T02:24:52.427Z’

Bubb, Ryan. 2013. “The Evolution of Property Rights: State Law or Informal Norms?” The Journal of Law & Economics 56 (3): 555–94.

Where do property rights come from?

`

Hi Jonathan,

Thank you for the report.
That’s strange. I tried to reproduce it with the provided Markdown with a YAML frontmatter, but it worked as expected.
If you found any other hint to reproduce it, please let me know!

I’m having the same issue. I was able to fix it by charging the line breaks in the imported notes from “—” to “***”.

Hi Brad,

Thanks for the information.
I tried to put --- in the middle of the note but couldn’t reproduce it.
Maybe there is other factor to cause the issue.

The --- YAML separator is at the top of the document. Here is a complete markdown file which generates the error for me (this particular header was generated by Notable):


title: read_BubbJLE13
tags: [DevII, enclosure, read_notes]
created: ‘2020-02-19T15:41:05.620Z’
modified: ‘2020-07-10T02:24:52.427Z’

Bubb, Ryan. 2013. “The Evolution of Property Rights: State Law or Informal Norms?” The Journal of Law & Economics 56 (3): 555–94.

Where do property rights come from?

  • Imposed from above by states?
  • More organic evolutionary adaptations of norms and customs from below?
    • If the latter, what are correlates of property rights regimes across regions?

Sorry, I think the forum reformatted the markdown I pasted in so that you might not see the separators clearly. Let me try again:

---
title: read_BubbJLE13
tags: [DevII, enclosure, read_notes]
created: '2020-02-19T15:41:05.620Z'
modified: '2020-07-10T02:24:52.427Z'
---

Bubb, Ryan. 2013. “The Evolution of Property Rights: State Law or Informal Norms?” *The Journal of Law & Economics* 56 (3): 555–94.

Where do property rights come from?

- Imposed from above by states?
- More organic evolutionary adaptations of norms and customs from below?  
  - If the latter, what are correlates of property rights regimes across regions? 

Thanks, but still unable to reproduce it. It works fine as you can see:

Do you have any plugins installed? Try disabling them.
I’ll try it on Windows.

It worked on Windows as well.

I reproduced it with the following invalid YAML frontmatter:

---
<style>
.mde-preview * {
  color: red;
}
</style>
---

It’s obviously not a YAML, so the markdown parser fails to parse it.
So, if you got the error, you should check your YAML syntax.
The problem is that the app doesn’t report any helpful information but only the non-sense message.
I will fix it in the next release.

Thanks!

I can confirm that 2 triple-dash lines separated by a code block creates the error, and removing both triple-dashes removes the error.
Attached is a screenshot of the error.

confirmed that it can be also reproduced with this:

### header

* list
  * sub-list

---

* list
  * sub-list

---

YAML frontmatters should always appear in the first line.
The expected behavior is that horizontal lines are inserted.
OK, I can fix it!

I built a patch for this issue. Could you guys try it?

Landed in v5.0.1🎉

1 Like

Confirming the triple dash error is fixed, thanks.
Dave