Skip to content

ValueError for strokes of the form 2# #1486

@dnaq

Description

@dnaq

Describe the bug

My rtf-dictionary for Phoenix contains a bunch of strokes that end with the number sign. These are parsed by the rtf parses, but plover-stroke considers them invalid strokes since it wants them to start with the number bar sign.

I wasn't sure if I should file the bug here or in plover-stroke, since it could either be seen as a normalisation isse when parsing the rtf-file, or as a bug in plover-stroke.

To Reproduce

  1. The following rtf-dictionary reproduces the bug:
{\rtf1\ansi{\*\cxrev100}{\*\cxdict}
{\*\cxsystem caseCATalyst4 version 19.06 by Stenograph L.L.C.}
{\info{\creatim\yr2011\mo8\dy8}
{\revtim\yr2019\mo11\dy25}
{\buptim\yr0\mo0\dy0}
}{\stylesheet{\s0 Normal;}{\s1 Question;}{\s2 Answer;}{\s3 Continuation;}{\s4 Colloquy;}{\s5 Paren;}{\s6 By Line;}{\s7 UserDef}}
{\*\cxsgstenotable \cxsgstnormal STKPWHRAO*EUFRPBLGTSDZ#(!
\cxsgstshifted 12K3W4R50*EU6R7B8G9SDZ#(!
\cxsgstenoleft7\cxsgstenomiddle5\cxsgstenoright10}
{\*\cxs 2#}2
}

Expected behavior

The chapter on the number bar in the RTF CR Extensions document says the following:

IV.C.1.iii Number Bar
If the number bar was used in a stroke, the stroke contains a number sign to indicate that. The number sign may be anywhere within the stroke, but should probably be at one end or the other (e.g., /18# or /#18 but not /1#8). Note that the number bar may be used even if no numeral-equivalent keys are pressed. For instance, the stroke /K# is perfectly valid even though the 'K' steno character doesn't correspond to a numeral, and it is not the same as the stroke /K without the number bar.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions