-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
XML and Text formatting support (#184)
* Add support for XML. Add bindings to XMLFragment, XMLElement, XMLText, and XMLEvent. Allows reading and writing of XML fragments from the document, which rich text editors use heavily. Closes #151 * Add support for formatting and embeds in Text Rich text editors often store their markup in attributes and embeds. * Allow apply_update in a transaction Currently trying to use apply_update in a transaction causes a deadlock, as apply_update tries to make its own new transaction but is locked out. This reuses the existing transaction, which also allows applying multiple updates in a single transaction. * Add __eq__ and __hash__ to XML types Allows comparing whether objects refer to the same element in a doc. Important since every access generates a new, unique Python wrapper instance. __eq__ is based directly from the underlying rust objects' `Eq` implementation. __hash__ is based off of the `Hash` implementation of the `BranchID` of the rust objects. * Add XmlText.diff Like Text, XmlText can contain embedded formatting, so make that available. * Mypy and ruff fixes and formatting * Document XML types * More lint fixes * Add XML related tests and fixes for found bugs
- Loading branch information
1 parent
5df30e0
commit a0d91dd
Showing
16 changed files
with
1,540 additions
and
49 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,6 @@ __pycache__/ | |
*.so | ||
Cargo.lock | ||
.coverage | ||
/site | ||
/dist | ||
_pycrdt.*.pyd |
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.