-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unnecessary space in HTML tags #30585
Conversation
The rich-text component was adding a space to the opening root tag of HTML before passing it to Aztec. I don't think this resulted in any bugs, so this change is more of a code clean-up.
Size Change: 0 B Total Size: 1.42 MB ℹ️ View Unchanged
|
The snapshot tests failed because some of them expected a space in opening tags, e.g.:
I updated the failing tests using:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! I checked this extraAttributes
is only used for ol
elements and those are adding their own space when concatenating 👍
Tested it a bit and all looks good. Thanks for cleaning this up!
@geriux I'd forgotten to check ordered lists ( I went to test the "Ordered list settings" now and noticed they are not working 🤔 Setting the start value or "reverse list numbering" isn't working. I tested the current WPiOS 17.0 and they don't seem to be working their either. (It does work when I preview the post–since the right HTML is produced by the editor–it's just that the editor itself doesn't reflect these changes. I'm thinking that it's a separate issue though and I can merge this and create a separate issue for that, what do you think? |
Oh! I missed that 😓
Yeah, I think this one is unrelated and we can work on that bug on another issue. Thanks! |
Sounds good! I created an issue here: #30623 |
Description
The rich-text component was adding a space to the opening root tag of HTML before passing it to Aztec. I don't think this resulted in any bugs, so this change is more of a code clean-up.
Related: wordpress-mobile/gutenberg-mobile#3367
How has this been tested?
With the mobile editor empty and the debugger attached, I put a breakpoint in
AztecView.js
on this line and typed a single "R" character into an empty Paragraph block. Loggingthis.props.text
gave:Before this change, I would see this (note the space in the opening
<p>
tag:Types of changes
Code clean-up.
Checklist:
*.native.js
files for terms that need renaming or removal).