Automattic / Automattic/simplenote-electron

The character counter counts the new line as two characters

Open
#3,132 0 comments 0 reactions 1 assignee Claimed by @codebykat View on GitHub
bug
Dominant language
TypeScript
Stars
5.3k
Forks
588
Avg merge
9h 45m
Merged PRs (30d)
4

Description

You need to know the exact number of characters, especially if you are writing a post on social networks, where the number of characters is limited.

### Expected
The newline "\n" (CR) should only count as one character.

### Observed
When I write note "a\nb\nc" I expect that character counter under the "Info" shows me 5 characters.
a
b
c
But the result is 7.

### Reproduced
1. Write a short message
2. Click on Info icon
3. Count characters manually and compare

### Where did you see the bug
- OS: Windows 10
- Browser: EDGE

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.