Repository navigation
Say what MarkdownPdfOptions.ImageLoader reads by default - #193
Merged
Merged
Conversation
Without a loader, MarkdownPdf reads images as the viewer does, under AllowedImageSchemes and AllowedImageHosts (https images only by default). The XML doc and the READMEs now say so, and how a host that must read nothing passes a loader that returns null. A PDF, unlike an HTML page, has no link to fall back on for an image it does not read.
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.
Follow-up to #192 (#188).
Without an
ImageLoader,MarkdownPdfreads images as the viewer does, underAllowedImageSchemesandAllowedImageHosts(by defaulthttpsimages only). This is kept on purpose: a PDF, unlike an HTML page fromMarkdownHtml, cannot keep an unread image as a link, so reading nothing by default would leave most hosts with PDFs that have no images.<remarks>ofMarkdownPdfOptions.ImageLoadersay what is read by default, that image hosts see the request as they do when the viewer shows the document, and that a host which must read nothing passes a loader returningnull.Documentation only; no behaviour changes.