Be a bit more pragmatic with language guessing

This commit is contained in:
Ben S
2015-11-23 13:32:57 +00:00
parent 487b87d13a
commit 85a4eb2830

View File

@@ -979,10 +979,14 @@ OSErr guessLanguage(BBLMParamBlock &params)
{ {
BBLMTextIterator iter(params); BBLMTextIterator iter(params);
if (iter.strcmp("use ", 4) == 0 || iter.strcmp("#![crate_id", 11) == 0) if (iter.strcmp("#![crate_name", 13) == 0)
{ {
params.fGuessLanguageParams.fGuessResult = kBBLMGuessDefiniteYes; params.fGuessLanguageParams.fGuessResult = kBBLMGuessDefiniteYes;
} }
else if (iter.strcmp("use ", 4) == 0 || iter.strcmp("//! ", 4) == 0)
{
params.fGuessLanguageParams.fGuessResult = kBBLMGuessMaybe;
}
return noErr; return noErr;
} }