We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9bbb77a commit bc6e8dfCopy full SHA for bc6e8df
1 file changed
src/fileConverter.ts
@@ -144,7 +144,7 @@ function rankLanguages(document: vscode.TextDocument): Language[] {
144
}
145
146
const fileName = document.fileName;
147
- if (/JSON$/i.test(fileName)) {
+ if (/JSON[CL]?$/i.test(fileName)) {
148
languageScores.JSON += 6;
149
150
if (/YA?ML/i.test(fileName)) {
@@ -171,7 +171,7 @@ function rankLanguages(document: vscode.TextDocument): Language[] {
171
if (/^\s*{\s*$|^\s*{\s*"/i.test(text)) {
172
languageScores.JSON += 2;
173
174
- if (/^\s*#|^%|^\s*\w+:\s/i.test(text)) {
+ if (/^\s*#|^%|^\s*\w+:\s|^---/i.test(text)) {
175
languageScores.YAML += 4;
176
177
if (/^\s*{/i.test(text)) {
0 commit comments