Skip to content

Commit 2c103ac

Browse files
thamaraRokt33r
authored andcommitted
Fix #888 - Wrong word count due splitting
1 parent c0a5eb0 commit 2c103ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/main/Detail/MarkdownNoteDetail.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ class MarkdownNoteDetail extends React.Component {
511511
exportAsTxt={this.exportAsTxt}
512512
exportAsHtml={this.exportAsHtml}
513513
exportAsPdf={this.exportAsPdf}
514-
wordCount={note.content.replace(/\r?\n?\s+/g, ' ').trim().split(' ').length}
514+
wordCount={note.content.trim().split(/\s+/g).length}
515515
letterCount={note.content.replace(/\r?\n/g, '').length}
516516
type={note.type}
517517
print={this.print}

0 commit comments

Comments
 (0)