On Mon, May 18, 2020 at 6:29 PM Gregory Nutt <spudan...@gmail.com> wrote: > > Are abbreviations like MHz, KHz, Hz, intended to be exceptions to the > > mixed case rules? > > Yes, the coding standard is here:
snip > If that is not working, then please consider a PR. I see logic that > picks off and ignores MHz but nothing that looks for Hz. You might want > to add that. That should be something like: > > else if(!have_upper || n < 1|| line[n - 1] != 'H') > { > have_lower = true > } I see this at line 1463: [[[ case 'z': if (!have_upper || n < 2 || line[n - 1] != 'H' || line[n - 2] != 'M') { have_lower = true; } break; ]]] Eliminating the check for 'M' and reducing n < 2 to n < 1 should suffice, so that all of: Hz, KHz, MHz, GHz would be recognized work. [[[ case 'z': if (!have_upper || n < 1 || line[n - 1] != 'H') { have_lower = true; } break; break; ]]] I'll open a PR momentarily... Thanks, Nathan