Render HTML rich content and make external-content URLs clickable#4072
Merged
Conversation
Fetched text/html now renders as formatted text via shr, in both the REPL and the rich-content popup (and in the inline fallback path). The URL of an external-content result is a link opening in the browser, next to its [show content] button. Also gate the interactive-eval content-type flag on the default handler: custom callbacks (eval-to-comment, pprint flows) never render rich content, so they shouldn't request it - which also clears the way for the server to stop sending value alongside content-typed responses.
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.
Third round of the rich-content work:
text/htmlrenders as formatted text viashr(REPL, popup, and the inline fallback path). Slurping an.htmlfile or anhttp(s)page now produces something readable instead of a wall of markup.[show content].content-typeflag is only sent for the default handler; custom callbacks (eval-to-comment, pprint flows, third-party) never render rich content, so they shouldn't request it. This also clears the way for the middleware to stop double-sendingvaluealongside content-typed responses (coming in cider-nrepl alpha2).