Skip to content

Commit

Permalink
enh(Development) allow for browser-testing of 'extra' language. (#2978)
Browse files Browse the repository at this point in the history
- Fix find default.txt for testing extra language.
  • Loading branch information
dbadb authored Jan 29, 2021
1 parent b9e8148 commit 1e0cc76
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/lib/language.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,14 @@ class Language {
}

get samplePath() {
return `./test/detect/${this.name}/default.txt`
if (this.moduleDir) {
// this is the 'extras' case.
return `${this.moduleDir}/test/detect/${this.name}/default.txt`;
}
else {
// this is the common/built-in case.
return `./test/detect/${this.name}/default.txt`;
}
}

loadMetadata() {
Expand Down

0 comments on commit 1e0cc76

Please sign in to comment.