File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1052,7 +1052,7 @@ function extend(target) {
10521052
10531053/* The right word count in respect for CJK. */
10541054function wordCount ( data ) {
1055- var pattern = / [ a - z A - Z 0 - 9 _ \u0392 - \u03c9 \u0410 - \u04F9 ] ] + | [ \u4E00 - \u9FFF \u3400 - \u4dbf \uf900 - \ufaff \u3040 - \u309f \uac00 - \ud7af ] + / g;
1055+ var pattern = / [ a - z A - Z 0 - 9 _ \u0392 - \u03c9 \u0410 - \u04F9 ] + | [ \u4E00 - \u9FFF \u3400 - \u4dbf \uf900 - \ufaff \u3040 - \u309f \uac00 - \ud7af ] + / g;
10561056 var m = data . match ( pattern ) ;
10571057 var count = 0 ;
10581058 if ( m === null ) return count ;
@@ -1517,8 +1517,8 @@ SimpleMDE.prototype.render = function(el) {
15171517 this . gui . sideBySide = this . createSideBySide ( ) ;
15181518
15191519 this . _rendered = this . element ;
1520-
1521-
1520+
1521+
15221522 // Fixes CodeMirror bug (#344)
15231523 var temp_cm = this . codemirror ;
15241524 setTimeout ( function ( ) {
@@ -1782,14 +1782,14 @@ SimpleMDE.prototype.createStatusbar = function(status) {
17821782
17831783 if ( name === "words" ) {
17841784 defaultValue = function ( el ) {
1785- el . innerHTML = "0" ;
1785+ el . innerHTML = wordCount ( cm . getValue ( ) ) ;
17861786 } ;
17871787 onUpdate = function ( el ) {
17881788 el . innerHTML = wordCount ( cm . getValue ( ) ) ;
17891789 } ;
17901790 } else if ( name === "lines" ) {
17911791 defaultValue = function ( el ) {
1792- el . innerHTML = "0" ;
1792+ el . innerHTML = cm . lineCount ( ) ;
17931793 } ;
17941794 onUpdate = function ( el ) {
17951795 el . innerHTML = cm . lineCount ( ) ;
You can’t perform that action at this time.
0 commit comments