Word count

keith.knipling's Avatar


14 Oct, 2011 03:17 PM

It would be wonderful if Marked's word count only considered rendered characters. I.e., not counting text that is commented out. Often I am writing abstracts to submit to conferences and I need to get under a certain word count. In drafting the abstract I often comment-out text until I get below the threshold. However, I often want keep a record of what I had in the text originally (just commented out) to make further revisions.

  1. Support Staff 1 Posted by Brett on 14 Oct, 2011 03:42 PM

    Brett's Avatar

    This is difficult. The word count doesn't run on the rendered HTML, that would require more complex tag stripping than I'd like to do. It runs before the HTML renders from Markdown, so comments are going to be included. I may be able to parse them out manually, though, so I'll add that to the feature request list.

    I assume you're using standard HTML comment syntax (<!-- -->)?

  2. 2 Posted by keith.knipling on 14 Oct, 2011 03:45 PM

    keith.knipling's Avatar

    Yes, standard html comments (<!-- -->). Thanks for looking into this. Would be a huge benefit!

  3. Support Staff 3 Posted by Brett on 15 Oct, 2011 03:27 AM

    Brett's Avatar

    Nailed it! Next release (1.3.1) excludes HTML comments from all statistics.

  4. Brett closed this discussion on 15 Oct, 2011 03:27 AM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac