isaaclyman / novel-word-count-obsidian

Obsidian plugin. Displays a word count or other statistic for each file, folder and vault in the File Explorer pane.
https://obsidian.md/plugins?id=novel-word-count
MIT License
85 stars 8 forks source link

Option to exclude header hash / sharp symbol `#` from word count #69

Closed hsandt closed 11 months ago

hsandt commented 11 months ago

Problem

I noticed that on a long text, the Novel word count quite differed from the count given by Better Word Count on the top header of my file (thus containing all the text in the file, except the header itself).

There, I discovered that the header text itself was counted by Novel word count, which okay, but that the starting hash / sharp symbols #, ##, etc. were also counted as +1, which is not okay for my count.

For now, I just ignore the difference, but since I use a trick to mark invisible sections in my novel that appear in the Outline view but not in exported PDF, using headers filled with comments (and not commented headers, it wouldn't work):

## %% Section 1 %%

this should count as 0 words, but ## still counts as 1 word.

Idea

So it would be nice to have an advanced option to ignore certain symbols from word count. Personally, I think we should ignore groups of # by default.

isaaclyman commented 11 months ago

See #62.

isaaclyman commented 9 months ago

@hsandt This should be fixed now (v3.4.0).