MD014 does not allow command output to start with empty line
See original GitHub issueIf the command output starts with an empty line, MD014 throws an error since change https://github.com/DavidAnson/markdownlint/commit/c4f77e021dc93626bc8ad465d2b70cb2a448af12. Some command outputs just start with an empty line, so I think this should be allowed, for example:
$ dig github.com
; <<>> DiG 9 <<>> github.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 166
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 65394
;; QUESTION SECTION:
;github.com. IN A
;; ANSWER SECTION:
github.com. 13 IN A 140.82.118.3
;; Query time: 14 msec
;; SERVER: 127.0.0.53#53(127.0.0.53)
;; WHEN: Tue Dec 24 11:37:17 CET 2019
;; MSG SIZE rcvd: 55
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
markdownlint/RULES.md at main - GitHub
Aliases: ul-start-left. This rule is triggered when top level lists don't start at the beginning of a line: Some text * List item...
Read more >What is the preferred method to echo a blank line in a shell ...
All of these commands can be used to echo a blank line: echo , echo '' , echo "". We cant use echo...
Read more >Markdownlint Rules - kiki
Using spaces to indent blank lines inside a list item is usually not necessary, ... MD014 - Dollar signs used before commands without...
Read more >Markdownlint - Visual Studio Marketplace
Open Visual Studio Code; Press Ctrl+P / ⌘P to open the Quick Open dialog; Type ext install markdownlint to find the extension ·...
Read more >How to stop the Windows command line from outputting an ...
will not have the empty line in between since above is the the trick that allows printing stuff without a trailing line break....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
That’s an interesting way to think about this, thank you! I will keep that in mind when I go to fix this and see if it helps to do what you want without violating the general guidance.
I’m not sure if this deserves its own issue, but there is also the problem of commands that do not have output, like cd. If cd is in the middle of a list of commands, the
$
seems appropriate:When some commands do have output and others do not, the
$
still indicates which lines are new commands and are which lines are output. In the linked guide, the second “good” example shows a line without output: https://cirosantilli.com/markdown-style-guide#dollar-signs-in-shell-code