Closed thombruce closed 3 months ago
This would be a good opportunity to look at what other decorations are available to us; e.g. tooltip text.
We could use such a decoration to display the calculated total value of the line item based on the price at the start of the string multiplied by the value at the end of the string.
It would also be a good opportunity to revise the prices regex, which currently matches currency symbols alone. It should only match values that feature a currency symbol followed by at least one number, optionally separated by a decimal point.
£ should not match
$ should not match
$1 should match
£1.50 should match
$.50 should match
Decimal point should also be allowed to be a ,
character. At present, I have no plans to allow thousands- or hundreds- separators (be they commas, spaces or underscores); eventually we may reconsider this.
Feature request
This is mainly applicable to shopping lists. The idea is simple: A price appears at the start of the line indicating the price of an individual item, and a multiplier appears at the end of the line indicating how many of that item you wish to get. This pair of values can be used later to calculate the full cost of the line item, and of course the full cost of the shopping list.
Example:
The scope of this issue is limited only to detecting the multiplier at the end of the line (matching the pattern
/ x[0-9]+$/
) and setting an appropriate color for the matched items.Code of Conduct