Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: document apostrophe as an explicit string literal trigger #960

Closed
1 of 5 tasks
sequba opened this issue Apr 11, 2022 · 3 comments · Fixed by #1334
Closed
1 of 5 tasks

Docs: document apostrophe as an explicit string literal trigger #960

sequba opened this issue Apr 11, 2022 · 3 comments · Fixed by #1334
Labels
Docs Improvements or additions to documentation Impact: High Released

Comments

@sequba
Copy link
Contributor

sequba commented Apr 11, 2022

Description

It's an undocumented feature

By starting the cell content with ' character (apostrophe) our parser treats the rest of it as string. It is a way to prevent automatic conversion strings to number, date and time values.

Links

https://handsoncode.slack.com/archives/C031GBX62SE/p1667382294314379 (internal discussion)
#959

it('starts with \'', () => {
expect(cellContentParser.parse('\'123')).toEqual(new CellContent.String('123'))
expect(cellContentParser.parse('\'=1+1')).toEqual(new CellContent.String('=1+1'))
expect(cellContentParser.parse('\'\'1')).toEqual(new CellContent.String('\'1'))
expect(cellContentParser.parse('\' 1')).toEqual(new CellContent.String(' 1'))
expect(cellContentParser.parse(' \'1')).toEqual(new CellContent.String(' \'1'))
expect(cellContentParser.parse('\'02-02-2020')).toEqual(new CellContent.String('02-02-2020'))
})

Type of issue

  • Missing documentation
  • Error in the documentation
  • Request for a demo
  • Request for a tutorial, guide etc.
  • Other issues, suggestions or ideas
@sequba
Copy link
Contributor Author

sequba commented Dec 15, 2022

Possible duplicate: #1087

@sequba sequba added the Good First Issue Good for newcomers label Jan 5, 2023
@sequba sequba removed the Good First Issue Good for newcomers label Mar 22, 2023
@sequba
Copy link
Contributor Author

sequba commented Oct 31, 2023

Another question related to that: #1326

@AMBudnik
Copy link
Contributor

Fixed with #1334 in HyperFormula 2.6.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Improvements or additions to documentation Impact: High Released
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants