<commit_before># README

This extension does the following:

## WordCount File Watcher
Whenever a `markdown` file is loaded a status bar message is added which includes the current word count - this live updates as you type and move from file to file:

![Status](images/StatusWordCount.gif)

### Issues: Word Count
the events for opening and closing a file don't seam to fire predictably:

Repro:
1. run extension
2. open a folder w/ moced filed
3. open a `.md` file status bar _may_ activate
4. once activzated navigate to another file e.g. `.js`
5. status bar stay stay active
6. navigate to another `.md` status bar will probably activate but may have a stale count

## Keybinding 'Alt+T' - Test Tools
Also available as `command`.

Hit `Alt+T` to get some text replacement tools e.g.
* toUpper
* toLower
* Reverse
* HTML Encode
* ..

![Tools](images/commands.gif)

Will replace all selections in the current editor.

### Issues: Ugly Code
Lots of copy and paste can abstract [my] common code.

### Issues: Encode HTML
This function will replace the selection(s) with more text than they had orriginally e.g.

* `hello <div> world`
* Results in `hello &gt;div&lt; world`

In the code I attempt to handle this with some simple re-writing of the selection range from the replacement `txt.length`.  However the resulting selection is much longer.  

Repro:
1. Open a doc
2. select some text w/ html in it
3. `Alt+T' select Encode HTML
4. Resulting selection will be to long and the status bar indication of 'selected' will be incorrect

I see some debug style output in the console for sections as well.<commit_msg>Correct Image URL<commit_after># README

This extension does the following:

## WordCount File Watcher
Whenever a `markdown` file is loaded a status bar message is added which includes the current word count - this live updates as you type and move from file to file:

![Status](images/StatusWordCount.gif)

### Issues: Word Count
the events for opening and closing a file don't seam to fire predictably:

Repro:
1. run extension
2. open a folder w/ moced filed
3. open a `.md` file status bar _may_ activate
4. once activzated navigate to another file e.g. `.js`
5. status bar stay stay active
6. navigate to another `.md` status bar will probably activate but may have a stale count

## Keybinding 'Alt+T' - Test Tools
Also available as `command`.

Hit `Alt+T` to get some text replacement tools e.g.
* toUpper
* toLower
* Reverse
* HTML Encode
* ..

![Tools](images/Commands.gif)

Will replace all selections in the current editor.

### Issues: Ugly Code
Lots of copy and paste can abstract [my] common code.

### Issues: Encode HTML
This function will replace the selection(s) with more text than they had orriginally e.g.

* `hello <div> world`
* Results in `hello &gt;div&lt; world`

In the code I attempt to handle this with some simple re-writing of the selection range from the replacement `txt.length`.  However the resulting selection is much longer.  

Repro:
1. Open a doc
2. select some text w/ html in it
3. `Alt+T' select Encode HTML
4. Resulting selection will be to long and the status bar indication of 'selected' will be incorrect

I see some debug style output in the console for sections as well.
{'fraction_non_alphanumeric': 0.0724009900990099, 'fraction_numerical': 0.006188118811881188, 'mean_word_length': 4.0124031007751935, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1479899', 'n_tokens_mistral': 931, 'n_tokens_neox': 908, 'n_words': 505}