mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-26 22:07:07 +00:00
Type: refuse negative or fractional byte offsets in text commands
text.startList read a negative or fractional `at` as the end of the text, so it could remove a typed list marker there and start a list. The `start` and `end` of text.editRange, text.getRange, text.setRangeStyle and the type shortcut commands given an `id` read such values as the start or end of the text. These now return "`at` must be a whole number" (naming the key) and change nothing. Omitted or null keys keep their defaults, and 2.0 is read as 2.
This commit is contained in:
@@ -1207,6 +1207,11 @@ and `amount` in `color.harmony`; `angle` in `paint.editGradient` and in the `gra
|
||||
`width` and `tolerance` in `livePaint.strokeEdge`. A null is read as a key left out. A gradient stop that names a
|
||||
swatch refuses a `tint` that is not a number with `` stop 0: `tint` must be a number ``.
|
||||
|
||||
A byte offset must be a whole number of at least 0. `at` in `text.startList`, and `start` and `end` in
|
||||
`text.editRange`, `text.getRange`, `text.setRangeStyle` and the `type.step`, `type.size.*`, `type.resetTracking` and
|
||||
`type.resetHorizontalScale` commands given an `id`, refuse a negative or fractional number with
|
||||
`` `at` must be a whole number ``, naming the key, and change nothing. `2.0` is read as `2`, and a null as the key left out.
|
||||
|
||||
A step can use an earlier step's result, in `run` as in the `command_batch` tool. A parameter string that is exactly
|
||||
`$N` or `$N.path` takes that value from the result of step `N` (counting from 0, in the order they ran; `run --in`'s
|
||||
open isn't a step), and `$last…` from the step before. A path goes into objects by key and arrays by index:
|
||||
|
||||
Reference in New Issue
Block a user