This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
Conversation
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
`<br />` nodes. They should be post-processed later to translate them to paragraphs.
…n' chars in `to_html`
* Fix selection writing * Fix wrapping block nodes in block nodes
Status update of this task:
Next steps:
|
* fixing empty paragraphs not being rendered as newlines * fixing as many tests and things as possible * we should always remove the \n * fix for links and inlinecode * fixing some more tests * created a function that removes the trailing new line only when strictly necessary * improvement * updating tests * removed useless comments * Fix mis-calculation in `ContainerNode.text_len()` * last test fixed * fixing the list case and improved the comment * fix * improved the comment * Remove FIXME and restore working UI tests (#509) * Empty paragraphs will return NBSP inside of them (#511) * nbsp added for empty paragraphs * fixed all the tests * removing nbsp * automatically trim enabled * trimming whitespaces Co-authored-by: Jorge Martín <[email protected]> Co-authored-by: aringenbach <[email protected]>
…er input (#514) * Improve quote/code blocks display upon applying content or on character input * fixed a bug on blockquotes where newlines where deleted and improved the formatting, now it renders after a newline has been added and a a character is typed (#515) Co-authored-by: Velin92 <[email protected]>
* Fix nbsp parsing with discardable text * we need to remove the blockquote check since this now since it's not needed anymore and the line is always added. * fixing a typo Co-authored-by: Mauro Romito <[email protected]>
* [iOS] Enable indent/unindent * Add indent/unindent WysiwygComposerTests * Add lists & indent/unindent UI tests * Remove trailing whitespace
* fix but not optimal * there is a bug but we're almost there. * failure * added tests but found two failing * improving the code but three tests are failing * fix but some tests are failing and there is a small (but ignorable since it's an impossible case) regression * failing test * Try to fix link creation in range * test improvements, removed some unused vars and imports * Added some comments to the code Co-authored-by: Jorge Martín <[email protected]>
… JS HTML parser.
- Fix parsing of line breaks in code blocks. - Add these changes to the web parser too.
* Initial steps to integrate the new paragraphs behaviour into the Android lib. * Add support for indent/unindent * Prepare the Android code to work with NBSP chars in the HTML input for the parser * Fix tests and add tests for paragraphs * Fix new lines in code blocks, add documentation to `HtmlToSpansParser`. * Fix wrong leading margin calculation on `BlockRendered` * Use NBSP instead of ZWSP, otherwise multiple whitespaces are broken * Fix instrumentation tests * Allow backspacing in index 0 (#523) * Fix code blocks after NBSP changes * Improve how leading margin is calcualted for SpanBackgroundRenderers and add code block support for `EditorStyledTextView`. * Try to uniffy span handling in HTML parser * Remove `gradle.xml` file
* add rust code to deal with splitting formatting nodes on pressing enter * add tests for rust to cover this * adds util in web to allow index/selection mapping to work
* Fix: insert paragraph at the middle of a block node with enter * Make code block test a bit clearer * Add extra tests * Fix broken test
* close to the solution but still experiencing a misalignment * partial fix for the end of the document * replaceNewlinesWithDiscardableElements however it doesn't work properly yet * improvements but the replace doesn't always work * finally this works * comment improvement * code improvement, we only replace with zwsp when necessary
SonarCloud Quality Gate failed. |
This was referenced Oct 11, 2023
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
The progression of the decisions around line breaks are as follow:
<br />
tags to represent new lines as most of our nodes were inline ones and it seemed like the simplest solution at the time.None of these solutions actually worked, so we proposed a new approach: use paragraphs along with other block nodes instead of line breaks, remove the ZWSPs altogether from the codebase and add extra offsets where needed.
Steps:
<p>
tags as much as possible.This also has the extra benefit that we’ll always use inline nodes (formatting, links, text, etc.) with inline nodes and block nodes with block nodes (paragraphs, blockquotes, pre, lists), making it easier to make them work together.
Why?
So we need a way to differentiate them.
Work to do:
find_pos
.