Skip to content

HTML API: add get/set inner/outer markup - #4956

Draft
dmsnell wants to merge 5 commits into
WordPress:trunkfrom
dmsnell:html-api/add-get-set-inner-outer-contents
Draft

HTML API: add get/set inner/outer markup#4956
dmsnell wants to merge 5 commits into
WordPress:trunkfrom
dmsnell:html-api/add-get-set-inner-outer-contents

Conversation

@dmsnell

@dmsnelldmsnell commented Aug 2, 2023

Copy link
Copy Markdown
Member

Status

Do not merge: This incorporates two other PRs, which may change before they are merged.

Todo

  • Add tests that change inner markup (vs. simply remove it)
  • Add tests that change outer markup (vs. simply remove it)
  • Add tests that perform multiple inner markup changes after each other.
  • Add tests that perform multiple outer markup changes after each other.
  • Add tests that perform inner markup changes after outer markup changes.
  • Add tests that perform outer markup changes after inner markup changes.
  • Add tests for when a node is implicitly closed after another is also implicitly closed.
  • Add examples to new function docblocks.
  • Review documentation to make sure it's explanatory enough.
  • Review names and try to find better ones for substr_bookmarks and replace_with_bookmarks

Questions

  • Should we add raw to the names to indicate even more that these are making potentially-destructive operations? This doesn't escape HTML because it can't, if it's already provided an HTML string. This also doesn't validate semantic rules, for example, adding a paragraph inside a paragraph. e.g. set_raw_inner_markup()

Description

Trac ticket:


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@dmsnelldmsnell changed the title Html api/add get set inner outer contentsHtml api/add get inner / outer contentsAug 2, 2023
@dmsnell
dmsnellforce-pushed the html-api/add-get-set-inner-outer-contents branch 2 times, most recently from e2a7146 to 851b3c7CompareAugust 3, 2023 00:42
@dmsnelldmsnell changed the title Html api/add get inner / outer contentsHTML API: add get inner / outer contentsAug 3, 2023
@dmsnell
dmsnellforce-pushed the html-api/add-get-set-inner-outer-contents branch 5 times, most recently from 060d219 to de410cdCompareAugust 3, 2023 22:06
@dmsnelldmsnell changed the title HTML API: add get inner / outer contentsHTML API: add get/set inner/outer markupAug 4, 2023
@dmsnell
dmsnellforce-pushed the html-api/add-get-set-inner-outer-contents branch 2 times, most recently from 242e8ba to 18cc399CompareAugust 9, 2023 18:23
@dmsnell

Copy link
Copy Markdown
MemberAuthor

Rebased from 242e8ba to 18cc399

@dmsnell
dmsnellforce-pushed the html-api/add-get-set-inner-outer-contents branch 3 times, most recently from 6698cd9 to 43db05fCompareAugust 14, 2023 14:51
@dmsnell
dmsnellforce-pushed the html-api/add-get-set-inner-outer-contents branch from 43db05f to 79bf013CompareNovember 16, 2023 20:40
@dmsnelldmsnell mentioned this pull request Apr 2, 2024
10 tasks
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

@dmsnell