Skip to content

Commit

Permalink
fix: Error on invalid %YAML directives
Browse files Browse the repository at this point in the history
  • Loading branch information
eemeli committed Mar 20, 2022
1 parent 9cecb85 commit 8f38c6a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/doc/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,8 @@ export class Directives {
this.yaml.version = version
return true
} else {
onError(6, `Unsupported YAML version ${version}`, true)
const isValid = /^\d+\.\d+$/.test(version)
onError(6, `Unsupported YAML version ${version}`, isValid)
return false
}
}
Expand Down
1 change: 0 additions & 1 deletion tests/yaml-test-suite.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const skip: Record<string, boolean | string[]> = {
'DK95/00': true,
'DK95/04': true,
'DK95/05': true,
'MUS6/00': ['errors'],
'Y79Y/004': ['errors'],
'Y79Y/005': ['errors'],
'Y79Y/006': ['errors'],
Expand Down

0 comments on commit 8f38c6a

Please sign in to comment.