v3.19.0 (review fixes): expose the menu-select Match case choice; doc/comment fixes
Review of 7250dbd:
- the step editor's menu-select form gains a Match case select
(Case-insensitive (default) / Case-sensitive); the step summary flags a
case-sensitive step with (case), the saved params carry
case_sensitive: true only when chosen, and the docs say the editor
authors the flag.
- docs/api.md: fix the 'with an optionally' grammar.
- the Variant-2 menu test's comment claimed a contains match while it is an
exact one; a real contains leg is added ('ыбор' -> item 128).
- timeless rationale for the case-insensitive default; the format note now
dates the change.
sw cache simple-v389 (index.html/help changed).
Tests: 821 frontend + 726 Python.
This commit is contained in:
@@ -281,9 +281,9 @@ def _normalise_params(kind, p):
|
||||
if mode not in ('exact', 'contains'):
|
||||
raise ScriptError('menu-select: mode must be exact or contains')
|
||||
out['mode'] = mode
|
||||
# Menu labels are UI text: case-insensitive by default (no test
|
||||
# scripts predate this choice); `case_sensitive: true` forces an
|
||||
# exact-case match.
|
||||
# Menu labels are UI text: a case slip should not fail a run, so
|
||||
# the match is case-insensitive by default; `case_sensitive: true`
|
||||
# forces an exact-case match.
|
||||
out['case_sensitive'] = bool(p.get('case_sensitive', False))
|
||||
if not out:
|
||||
raise ScriptError('menu-select: item_id or text is required')
|
||||
|
||||
Reference in New Issue
Block a user