Skip to content

#ERROR! when using a non-breaking space character inside formula #898

@sequba

Description

@sequba

As described in #877 by MartinDawson:

In our spreadsheet we use a contentEditable div. We parse the text using chevrotain's lexer to find the cells to highlight. Like so:

image

When we access the content using .textContent it seems to replace all spaces with non-breaking spaces.

This should be fine because hyperformula should replace ANY space. However it's missing non-breaking spaces from the regex:

pattern: /[ \t\n\r]+/

Hyperformula's lexer was returning #ERROR! due to this.

So it should be /s+ instead.

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingReleased

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions