Commit 37a7b17
committed
Remove annoying log output related to modelines
Currently, a log entry is emitted whenever a modeline comment is parsed.
This is because, in
#1193,
the logic for how modelines were parsed was changed.
On this line: https://github.com/redhat-developer/yaml-language-server/pull/1193/changes#diff-dc843f2ff5a3d197853464e616d6e413820becbc82e0e9a3aa6fc6d996976bb2L21
there is always 2 entries if a parsable modeline is present.
This is because the index 0 entry contains the entire match,
and the index 1 entry contains the group match (that contains
the URI of the schema).
This means that the `console.log()` will always run,
incorrectly alerting the user that they tried to specify two schemas in
the modeline.
Even if the message were accurate, I don't think logging is the best way
to alert the user to this problem.
This should ideally be a warning or error instead.
For now, I'm removing the `console.log()` entirely to address this.
Signed-off-by: David Thompson <davthomp@redhat.com>1 parent d9f5349 commit 37a7b17
1 file changed
+3
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
28 | 23 | | |
29 | 24 | | |
30 | 25 | | |
| |||
0 commit comments