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) {
1052
1052
1053
1053
/* The right word count in respect for CJK. */
1054
1054
function 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;
1056
1056
var m = data . match ( pattern ) ;
1057
1057
var count = 0 ;
1058
1058
if ( m === null ) return count ;
@@ -1517,8 +1517,8 @@ SimpleMDE.prototype.render = function(el) {
1517
1517
this . gui . sideBySide = this . createSideBySide ( ) ;
1518
1518
1519
1519
this . _rendered = this . element ;
1520
-
1521
-
1520
+
1521
+
1522
1522
// Fixes CodeMirror bug (#344)
1523
1523
var temp_cm = this . codemirror ;
1524
1524
setTimeout ( function ( ) {
@@ -1782,14 +1782,14 @@ SimpleMDE.prototype.createStatusbar = function(status) {
1782
1782
1783
1783
if ( name === "words" ) {
1784
1784
defaultValue = function ( el ) {
1785
- el . innerHTML = "0" ;
1785
+ el . innerHTML = wordCount ( cm . getValue ( ) ) ;
1786
1786
} ;
1787
1787
onUpdate = function ( el ) {
1788
1788
el . innerHTML = wordCount ( cm . getValue ( ) ) ;
1789
1789
} ;
1790
1790
} else if ( name === "lines" ) {
1791
1791
defaultValue = function ( el ) {
1792
- el . innerHTML = "0" ;
1792
+ el . innerHTML = cm . lineCount ( ) ;
1793
1793
} ;
1794
1794
onUpdate = function ( el ) {
1795
1795
el . innerHTML = cm . lineCount ( ) ;
You can’t perform that action at this time.
0 commit comments