Skip to content
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

Wp html processor text based #2

Open
wants to merge 43 commits into
base: trunk
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
7e7602c
Explore HTML parsing and Adoption Agency Algorithm
adamziel Feb 21, 2023
0bdd4f6
Emit text tokens
adamziel Feb 22, 2023
9026d1c
WP_HTML_Tag_Processor: Use the correct starting position when bookmar…
adamziel Feb 22, 2023
a24349a
Merge branch 'html-api-start-bookmarks-before-tag-opener-also-in-tag-…
adamziel Feb 22, 2023
ff9505b
Consume HTML text nodes as tokens
adamziel Feb 22, 2023
afbfdc5
Implement DOM insertion
adamziel Feb 22, 2023
9d31cb7
Fix a bug in the adoption agency algorithm
adamziel Feb 22, 2023
eeea95a
Correctly cose the p tags
adamziel Feb 22, 2023
ddf2c73
Simplify HTML Processor
adamziel Feb 22, 2023
db40a94
Correct the is_element_in_scope checks
adamziel Feb 22, 2023
ea4f392
Uncomment some test inputs
adamziel Feb 22, 2023
66fd636
Document insert_node
adamziel Feb 22, 2023
93fea6c
Simplify ignore_token()
adamziel Feb 23, 2023
fd2ddcf
Start exploring a text-based API
adamziel Feb 23, 2023
faf724e
Doodling more
adamziel Feb 23, 2023
0565b6b
Simplify the adoption agency algorithm
adamziel Feb 27, 2023
a287999
Get rid of next_token() logic
adamziel Feb 27, 2023
7430067
Remove Object-oriented logic
adamziel Feb 27, 2023
4f6ec24
More advanced diff-based approach
adamziel Feb 27, 2023
3a0ed5f
Remove class-wp-html-processor.php
adamziel Feb 27, 2023
a7d76e7
Close the tags in a correct order
adamziel Feb 28, 2023
0663a48
Reconstruct the active formatting elements in their correct location
adamziel Feb 28, 2023
7887401
Remove $reconstructed_html – always operate on the tag processor stream
adamziel Feb 28, 2023
481fce5
Clean up the API
adamziel Feb 28, 2023
140459e
Cleanup the API
adamziel Feb 28, 2023
26c6f21
Don't skip over RCData and Script tag closers
adamziel Feb 28, 2023
37659fb
MVP parser capable of parsing the entire HTML spec
adamziel Feb 28, 2023
956ad3b
First stab at traversal API
adamziel Feb 28, 2023
9889d4d
Avoid allocating a bookmark for each parsed tag
adamziel Feb 28, 2023
612cc83
Close open tags at the end of the document
adamziel Feb 28, 2023
4970159
MVP get_inner_html and get_outer_html
adamziel Feb 28, 2023
3dfccc5
Fix cursor position confusion during inner_html and outer_html
adamziel Feb 28, 2023
79f90ce
Adjust HTML diffing to make inner_html() and outer_html() work
adamziel Mar 1, 2023
4efef0b
Adjust bookmarks setting to suit outer_html better
adamziel Mar 1, 2023
0e3799b
Correctly process outer_html() using pinned bookmarks
adamziel Mar 1, 2023
ab608e5
Fix processing H1-H6 tag closers
adamziel Mar 1, 2023
5be3ba1
Simplify unit tests
adamziel Mar 1, 2023
7d19b9b
Add a complex use-case test
adamziel Mar 1, 2023
cb9d35d
Simplify nth_child and nth_sibling
adamziel Mar 1, 2023
3b27ca2
Fixy fix in the get_updated_html method
adamziel Mar 1, 2023
802e1c0
MVP support for updates before current parsing cursor
adamziel Mar 2, 2023
13badeb
Get all wp-html-processor tests to pass
adamziel Mar 2, 2023
2918ada
Remove debug artifacts
adamziel Mar 2, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading