gristlabs_grist-core/app/client/widgets
Dmitry S b4cc519616 (core) Ignore leading whitespace in formulas, and strip out leading '=' sign users might add
Summary:
This addresses two issues, differently:
- For a formula with leading whitespace, like " 1+1", it is stored as is, but
  is fixed to work (it should be valid Python, and whitespace is only stripped out
  at parsing time to avoid intentation errors caused by the way it gets parsed)
- For a formula with a leading equals-sign ("="), it is stripped out on the
  client side before the formula is stored. Grist documentation uses leading
  "=" to indicate formulas (because UI shows an "=" icon), and Excel formulas
  actually contain the leading "=", so it is a common mistake to include it.

Test Plan: Added new test cases

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D3873
2023-04-25 15:28:40 -04:00
..
AbstractWidget.js
AttachmentsEditor.ts
AttachmentsWidget.ts
BaseEditor.js
CellStyle.ts
CheckBox.css
CheckBoxEditor.js
ChoiceEditor.js
ChoiceListCell.ts
ChoiceListEditor.ts
ChoiceListEntry.ts
ChoiceTextBox.ts
ChoiceToken.ts
ConditionalStyle.ts
CurrencyPicker.ts
DateEditor.js
DateTextBox.js
DateTimeEditor.css
DateTimeEditor.js
DateTimeTextBox.js
DiffBox.ts
DiscussionEditor.ts
EditorButtons.ts
EditorPlacement.ts
EditorTooltip.ts
ErrorDom.ts
FieldBuilder.css
FieldBuilder.ts
FieldEditor.ts
FormulaEditor.ts
HyperLinkEditor.ts
HyperLinkTextBox.ts
NewAbstractWidget.ts
NewBaseEditor.ts
NTextBox.ts
NTextEditor.ts
NumericTextBox.ts
Reference.css
Reference.ts
ReferenceEditor.ts
ReferenceList.ts
ReferenceListEditor.ts
Spinner.css
Spinner.ts
Switch.css
TextBox.css
TextEditor.css
TextEditor.js
Toggle.ts
TZAutocomplete.ts
UserType.ts
UserTypeImpl.ts