Repository navigation
Conversation
The markdown_output filter was called once, then its result was cached. Any per-request customization (user-aware, time-aware, etc.) got frozen into the cache. Apply the filter after the cache lookup on both hit and miss paths so customizations run every request while the expensive HTML → Markdown conversion stays memoized. The function also overwrote $content with the rendered HTML before passing it to the filter as $original_html, which contradicted the README's documented "original HTML content" description. Separate $rendered from $content so both cache paths pass the raw function argument — consistent filter signature, matches the docs. Add post_content_to_markdown/conversion_cache_duration filter so the TTL is tunable, matching the existing feed_cache_duration convention. Bump to 1.7.1. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
markdown_outputfilter now runs per-request. Previously the filter was applied once and its result cached, so any request-dependent logic in user-installed filters (current user, current time, request context) was frozen into the first cached value. The filter now runs after the cache lookup on both hit and miss paths — expensivedo_blocks/do_shortcode/league/html-to-markdownwork stays memoized; customizations stay live.$contentwithdo_blocks/do_shortcode/ pre-flattened HTML before passing it to the filter as$original_html, contradicting the README's documented "original HTML content" description. Separate$renderedfrom$contentso both hit and miss paths pass the raw function argument. Users writing filters can rely on$original_htmlmeaning what the docs say it means.post_content_to_markdown/conversion_cache_durationfilter. Tunable TTL for the conversion cache, matching the existingfeed_cache_durationpattern. Default stays atHOUR_IN_SECONDS.Bumps to 1.7.1.
🤖 Generated with Claude Code