18F / omb-eregs

A tool to find, read, and maintain White House Office of Management and Budget (OMB) policy requirements

Home Page:https://policy-beta.cio.gov/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Lists aren't always renumbered when deleting text selections

toolness opened this issue · comments

To reproduce this issue, create the following numbered list in the editor:

1. One
2. Two
3. Three
4. Four

Then, with the mouse, select the text ne through Thre and press delete.

You should get the following list:

1. Oe
4. Four

The list isn't being renumbered because right now our fixupDoc() function only renumbers lists when it notices that a list item without any content exists. However, when deleting ne through Thre, the resulting document has no empty list items, which means that the renumbering logic won't be executed.

I'm not really sure what the best way to fix this is, but the footnote-renumbering logic I'm working on in #1027 has the same problem.