Changed regular expressions

Want to make C and F lowercase regardless of whether they occur at the start of the string or not.
pull/5387/head
mblemberg 2019-08-03 21:44:54 -05:00 committed by GitHub
parent 8009ba127d
commit de49b807b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -25,8 +25,8 @@ function hackFix(msg: string): string {
return msg
.replace(/^A /, "A, ") // "A takes" & "A 3" are mispronounced
.replace(/(\d) E (\d)/, "$1,E $2") // Strings such as 1E5 are treated as scientific notation
.replace(/^C /, "c ") // "uppercase C is pronounced as "degrees celsius" when it comes after a number (e.g. R8c3)
.replace(/^F /, "f "); // "uppercase F is pronounced as "degrees fahrenheit" when it comes after a number (e.g. R8f3)
.replace(/C /, "c ") // "uppercase C is pronounced as "degrees celsius" when it comes after a number (e.g. R8c3)
.replace(/F /, "f "); // "uppercase F is pronounced as "degrees fahrenheit" when it comes after a number (e.g. R8f3)
}
export function say(text: string, cut: boolean) {