Be a bit more pragmatic with language guessing
This commit is contained in:
6
rust.mm
6
rust.mm
@@ -979,10 +979,14 @@ OSErr guessLanguage(BBLMParamBlock ¶ms)
|
||||
{
|
||||
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;
|
||||
}
|
||||
else if (iter.strcmp("use ", 4) == 0 || iter.strcmp("//! ", 4) == 0)
|
||||
{
|
||||
params.fGuessLanguageParams.fGuessResult = kBBLMGuessMaybe;
|
||||
}
|
||||
|
||||
return noErr;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user