1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

Fix #888 - Wrong word count due splitting

This commit is contained in:
Thamara Andrade
2019-08-27 21:09:07 -03:00
committed by Junyoung Choi
parent ff7c4495f0
commit c0a5eb0d2b

View File

@@ -511,7 +511,7 @@ class MarkdownNoteDetail extends React.Component {
exportAsTxt={this.exportAsTxt}
exportAsHtml={this.exportAsHtml}
exportAsPdf={this.exportAsPdf}
wordCount={note.content.split(' ').length}
wordCount={note.content.replace(/\r?\n?\s+/g, ' ').trim().split(' ').length}
letterCount={note.content.replace(/\r?\n/g, '').length}
type={note.type}
print={this.print}