Color code for keyword fn changes based on trailing character \n cause no keyword highlight and expected highlighting is obtained when function name is followed after fn on the same line.
fn (no/wrong color)\n function_name
fn function_name //(expected color code is produced)