-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Block bindings: Add support for image caption #6838
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
Open
SantosGuillamot
wants to merge
18
commits into
WordPress:trunk
Choose a base branch
from
SantosGuillamot:add/support-caption-in-image-bindings
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
f584ad4
Add support for image caption
SantosGuillamot 7d7d5c3
Use HTML_Processor instead of HTML_Tag_Processor
SantosGuillamot 731d869
Move anonymous class inside image conditional
SantosGuillamot c360edf
Remove release_bookmark calls
SantosGuillamot afbf38c
Don't grab bookmarks until the end
SantosGuillamot cbe79ee
Add checks to ensure it doesn't replace unwanted html
SantosGuillamot 083c4e2
Add comments to clarify the set_inner_text function
SantosGuillamot 01d0e86
Clarify comments
SantosGuillamot 632e015
Add unit test for processing
SantosGuillamot 79013a9
Restrict method to figcaption
SantosGuillamot cf25d7d
Call function properly
SantosGuillamot 88df640
Fix figcaption conditional
SantosGuillamot 1c4ac72
Update private method comment
SantosGuillamot ac43482
Use alternative method
SantosGuillamot 19465c0
Set opening bookmark
SantosGuillamot 1855e5d
Change comments
SantosGuillamot 4e77262
Change function name
SantosGuillamot 825f78e
Change processor name and args
SantosGuillamot File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Don't grab bookmarks until the end
- Loading branch information
commit afbf38cd0f786022d8ef0c74ddb55ab371ff943b
There are no files selected for viewing
This file contains hidden or 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
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.
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.
this is an interesting side-effect of that choice. I think we should rename that constant to something scarier, like what its value is.
I kind of like that it makes anonymous classes stand out more.
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.
@sirreal I think this is a really good example of a part of the HTML Processor we're going to have to improve.
not only is the unlock code ugly here (ugly, because it shouts how this is work-around territory), but also by calling the constructor directly we bypass setting up the context node and the HTML node. in effect, this is starting as a full parser instead of a fragment parser.
I wonder how we can better allow subclassing without this hassle and risk.