#3527544 - Improve Hook Alterations and Cache Metadata Handling in Markdownify Module

Closes #3527544

Summary of Changes:

  • Added hook_markdownify_entity_build_alter to allow modules to modify the render array before converting it to HTML for Markdown transformation.
  • Enhanced hook_markdownify_entity_html_alter to include support for BubbleableMetadata, improving cache handling during HTML alterations.
  • Updated MarkdownifyEntityRenderer service:
    • Modified toHtml method to capture and merge cacheable metadata during rendering.
    • Updated renderEntity method to support render array alteration and consistent cache metadata integration.
  • Improved documentation in markdownify.api.php and service class methods.

Closes #3527544

Merge request reports

Loading