-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refined Atom behaviors wrt parsing, rerendering
* Atom splitting/cloning for section edits * Properly parse and render atom markup * Handle typing at end of atom better. wip. needs more testing * Change cursor#_findNodeForPosition to target the textnode after an atom's ending zwnj when there is one * Also changes the editor keyDown handler to reposition the cursor onto that next text node * Changes to dom parsing to read text content out of the zwnj on either side of an atom and merge it into the before/after marker (or create new marker(s) to accept that text) * Changes lifecycle callbacks #addCallbackOnce method to remove the once-added callback after flushing that queue * Add tests for content in atom headTextNode with nothing or marker before it * Test for atom headTextNode with atom before it, tailTextNode with nothing after it * Test tailTextNode with atom, marker after it * Tests for markupSection#length * Changes to fix small atom bugs: * Change _findCursorForPosition to focus on atom markers properly * DOM parser marks sections dirty when adding a new marker * postEditor#deleteBackwardFrom removes atom marker appropriately * Fix section.markersFor bug that truncated atom values, ctr-A, ctr-E * Fix bug with adding markup to a single atom * Add tests for complex atom (re-)rendering, refactor editor-dom renderer * Test that atoms are not coalesced. change marker.isEmpty -> marker.isBlank usage * Add atom#splitAtOffset * Remove marker#join * Add `canJoin` to atom and marker * Tests for inserting text in/around atoms, and reparsing atoms * Test for arrow movement across atoms * Test that selected text that includes/surrounds atoms can be deleted * Tests for position#move, lifecycle callbacks, other small cleanup
- Loading branch information
Showing
35 changed files
with
1,364 additions
and
405 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.