-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Parser: Use an HTML like attribute syntax for comment attributes #626
Changes from 1 commit
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 |
---|---|---|
|
@@ -150,7 +150,7 @@ describe( 'block parser', () => { | |
} ); | ||
|
||
const parsed = parse( | ||
'<!-- wp:core/test-block smoked:yes -->' + | ||
'<!-- wp:core/test-block smoked="yes" url="http://google.com" -->' + | ||
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. What does this new 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. Yes, handling spaces and special chars like these is one of the reasons I made this switch |
||
'Brisket' + | ||
'<!-- /wp:core/test-block -->' | ||
); | ||
|
@@ -160,6 +160,7 @@ describe( 'block parser', () => { | |
expect( parsed[ 0 ].attributes ).to.eql( { | ||
content: 'Brisket', | ||
smoked: 'yes', | ||
url: 'http://google.com' | ||
} ); | ||
expect( parsed[ 0 ].uid ).to.be.a( '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.
Shouldn't matter either way, but is this change intentional?
Separately, it might be nice to run the CI build against both parsers.
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.
Not intentional, I was switching to try both.