<commit_before># Maintaining cursor position in same-field formatting

This package implements several approaches to the problem of cursor
maintenance, which arises in the following scenario:

- the user has a movable cursor in an input field
- the user edits the text and leaves the cursor in the text
- the text is formatted by an automatic process
- the input field is overwritten with the formatted text
- where do you put the cursor?


## How to use the CursorMaintainer module

A cursor maintainer is a function that takes four arguments:

- the user's *raw text*
- the user's *raw cursor position*
- the position of 

After loading `cursor_maintainer.js`,

<commit_msg>Revise the README beginning<commit_after># Maintaining cursor position in same-field formatting

This package supports several approaches to cursor maintenance, which
arises in the following scenario:

- the user controls a cursor in an input field
- the user edits the text
- the text gets formatted by an automatic process
- the input field is overwritten with the formatted text

Where do you put the cursor in the formatted text? That is the problem
of cursor maintenance.


## Format-independent cursor maintenance

You can do cursor maintenance by passing three values to a function:

- the *raw text*
- the *raw cursor position*
- the *formatted text*

You get back one value:

- a *new cursor position*




{'fraction_non_alphanumeric': 0.04244604316546763, 'fraction_numerical': 0.0, 'mean_word_length': 4.209737827715355, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2665394', 'n_tokens_mistral': 360, 'n_tokens_neox': 340, 'n_words': 206}