check-md: fix missing default_command when nofmt was set (#8591)

pull/8593/head^2
Lukas Neubert 2021-02-05 19:25:27 +01:00 committed by GitHub
parent 9a1da1a97b
commit 59c1c77bfe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -170,6 +170,8 @@ fn (mut f MDFile) parse_line(lnumber int, line string) {
mut command := line.replace('```v', '').trim_space() mut command := line.replace('```v', '').trim_space()
if command == '' { if command == '' {
command = default_command command = default_command
} else if command == 'nofmt' {
command += ' $default_command'
} }
f.current = VCodeExample{ f.current = VCodeExample{
sline: lnumber sline: lnumber