Skip to content

[Bug] Words Count Stat is Incorrect #43

Closed

Description

@rrpolanco

I have a large Markdown document which Obsidian reports as 127,260 words but Zennotes only reports 34,608 words.

Activity

  1. self-assigned this
    on May 11, 2026
  2. added theissue type on May 11, 2026
  3. adibhanna commented on May 12, 2026

    @adibhanna
    Contributor

    Thanks for the report, @rrpolanco — confirmed and fixed in #47.

    Root cause: the StatusBar word counter was stripping fenced code blocks and inline code spans before splitting on whitespace. Obsidian counts those tokens, so a code-heavy document like yours lost a huge fraction of its words. The 127,260 → 34,608 ratio you saw (~73% loss) is consistent with a doc containing a lot of code.

    Verification: I reproduced it locally with a 76-word test note containing two fenced code blocks and two inline-code spans. The buggy build showed 52 words; with the patch it shows 76 (matching a manual hand-count and Obsidian).

    The fix will land in the next release.

  4. adibhanna commented on May 12, 2026

    @adibhanna
    Contributor

    Merged to main in #47 — will ship in the next release. Thanks again for the report, @rrpolanco!

  5. rrpolanco commented on May 12, 2026

    @rrpolanco
    Author

    Thanks for shipping this quickly @adibhanna !

  6. rrpolanco commented on May 13, 2026

    @rrpolanco
    Author

    @adibhanna The app is still reporting a different word count compared to Obsidian. Obsidian reports 127,260 words but Zennotes counts 82,448. However, the character count matches with Obsidian with 1,385,437.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions