PreFormatter: Nukes Zero Width Spacing character #429
Merged
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.
Details:
This is the (last) PR in the series "Let's stop using the Zero Width Spacing" character. We're replicating the exact same mechanisms (+ battle of unit tests) we've already got for Lists and Blockquotes.
Needs Review: @diegoreymendez
Thaaanks!!!
Closes #420
Closes #414
Testing:
Verifying this PR is gonna be a bit tricky, since we don't really have (yet) a way to toggle
Preblocks. Parsing from HTML is supported, but visual edition hasn't been shipped yet.In this PR i've added a
togglePremethod, analog totoggleListandtoggleBlockquote. In order to verify this PR, please:A. Switch to HTML
B. Insert
<pre>Payload</pre>C. Switch back!
Apologies about this inconvenience. We don't really have a
Pregridicon we could wire, right now, for this PR. Formal support coming in later, in another PR!--
Scenario A: Missing Pre after Backspace
Verify that the pre style is still present.
Scenario B: Nuking Pre after Backspace
PreTagVerify that the Pre gets effectively removed.
Scenario C: Newline after Pre
PreTagVerify that a newline is inserted below the pre.
Scenario D: Nuking bottom
\nand adding newlines\nand enter any random textVerify that the new Pre line gets it's proper style, even when the bottom
\nwas initially nuked.Scenario E: Typing Attributes below Pre
PreTagVerify that the Pre gets removed from the typing attributes (and that the text indentation looks normal).
Scenario F: Autoremoval after hitting return on newline
PreTagVerify that the blockquote gets removed.