Skip to content

Commit

Permalink
fix: Error on %YAML directives with content after version (fixes #348)
Browse files Browse the repository at this point in the history
Test coverage will be added by separately updating yaml-test-suite
  • Loading branch information
eemeli committed Mar 11, 2022
1 parent dd12652 commit 22dbe9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/doc/directives.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ export class Directives {
}
case '%YAML': {
this.yaml.explicit = true
if (parts.length < 1) {
if (parts.length !== 1) {
onError(0, '%YAML directive should contain exactly one part')
return false
}
Expand Down

0 comments on commit 22dbe9e

Please sign in to comment.