openstenoproject/plover

Title case misses words in some situations

Opened this issue · 1 comments

Describe the bug

{MODE:TITLE} has some logic to avoid capitalizing output for strokes that are attached to the previous stroke with ^, since you don't want capitalization in the middle of words that use suffix or prefix strokes. The problem is that it doesn't consider that a stroke could contain multiple words, or that two attached strokes aren't necessarily part of the same word.

To Reproduce

Each line is a stroke:

{MODE:TITLE}
one
two
{^ ^}
three four
five six

This produces the following output:

One Two three four Five Six

"three" is not capitalized because it is attached to the previous stroke, even though the previous stroke was an explicit space. "four" is not capitalized because it's part of the same attached stroke, even though it's a different word.

Expected behavior

With {MODE:TITLE} set, all of the words should be capitalized. Output would look like:

One Two Three Four Five Six

It should have a more complex heuristic for determining word boundaries, that takes into account space characters from the current and previous strokes.

Screenshots

If applicable, add screenshots to help explain your problem.

Operating system

  • MacOS Monterey
  • 4.0.0.dev12

I might take a crack at fixing this in the next few days, if I have time.