notes-cli
notes-cli copied to clipboard
produce valid markdown
Great tool. Can there be a blank line after the first heading please so the markdown is valid?
Could you describe exact steps to reproduce this (your environment, setup, command executed, expected output)
Hi there.
At the cli type notes new foo bar batz.
Expected result:
bar
===
- Category: foo
- Tags: batz
- Created: 2019-07-09T09:04:12+10:00
(Valid Markdown, with blank line after H1.)
Actual result:
bar
===
- Category: foo
- Tags: batz
- Created: 2019-07-09T09:04:12+10:00
(Invalid Markdown, with no blank line after H1.)
Thank you for the description. I'll look into this.
It seems that your 'Actual result' is not an invalid markdown.
From commonmark spec
In general, a setext heading need not be preceded or followed by a blank line. However, it cannot interrupt a paragraph, so when a setext heading comes after a paragraph, a blank line is needed between them.
So, === line just before list should be ok.
Does this actually break some markdown parser?
Hi yes indeed it breaks this rule: https://github.com/updownpress/markdown-lint/blob/master/rules/022-blanks-around-headers.md
for now I've added a local .markdownlint.json to the notes-cli directly disabling 022 and 032