-
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
Rich text: formats: allow format to filter value when changing tag name #35516
Changes from 4 commits
0dd8577
cbcdfd6
8f19d9b
e02f694
80dd602
5443df2
a5ff3bb
97cbbc1
1be2027
78a4905
077d753
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -29,7 +29,7 @@ import { __ } from '@wordpress/i18n'; | |
*/ | ||
import { textColor as settings } from './index'; | ||
|
||
function parseCSS( css = '' ) { | ||
export function parseCSS( css = '' ) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe a dev artefact? I would remove it too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done ✅ |
||
return css.split( ';' ).reduce( ( accumulator, rule ) => { | ||
if ( rule ) { | ||
const [ property, value ] = rule.split( ':' ); | ||
|
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.
Nit and curious: why the
join( ':' )
and not just a single string?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.
It's probably keeping with the style used in
./inline.js
. But personally I'd avoid it in such a situation, since I don't know how smart the VM is.