themes/default/public/scripts/ghostdown.js
function updateWordCount() {
        var wordCount = document.getElementsByClassName('entry-word-count')[0],
            editorValue = editor.getValue();

        if (editorValue.length) {
            wordCount.innerHTML = editorValue.match(/\S+/g).length + ' words';
        }
    }
function updateWordCount() {
        var wordCount = document.getElementsByClassName('entry-word-count')[0],
            editorValue = editor.getValue();

        if (editorValue.length) {
            wordCount.innerHTML = editorValue.match(/\S+/g).length + ' words';
        }
    }
function updateWordCount ( ) { var wordCount = document . getElementsByClassName ( 'entry-word-count' ) [ 0 ] , editorValue = editor . getValue ( ) ; if ( editorValue . length ) { wordCount . innerHTML = editorValue . match ( / \S+ / g ) . length + ' words' ; } }
Really not the best way to do things as it includes Markdown formatting along with words
Really not the best way to do things as it includes Markdown formatting along with words