markmv - v1.39.2
    Preparing search index...

    Function countWords

    • Counts words in markdown content, excluding fenced code blocks and inline code spans.

      The word-count rule is deliberately simple and deterministic: fenced code blocks (lines opening with three or more backticks or tildes, up to the matching closing fence) and inline code spans (backtick-delimited runs) are removed first, then the remaining text is split on whitespace and every non-empty token counts as one word. Link syntax, headings markers, and punctuation all count as part of their surrounding tokens.

      Parameters

      • content: string

        Raw markdown file content

      Returns number

      Number of whitespace-separated tokens outside code spans and fences