vscode-map-preview
vscode-map-preview copied to clipboard
See if we can request and load preview content instead of embedding it directly to the preview map HTML
Currently the raw text buffer of the active document is embedded into the HTML for making the preview map. I'm expecting a whole class of problems with this approach due to various characters in the active document that would need proper escaping before being embedded.
Instead, we should see if we can leverage this virtual document API to provide a second custom URI for the actual document content and see if we can use fetch() to retrieve said content (assuming it can support whatever custom URI schemes registered by VSCode)
This looks very unlikely, it seems that fetch() doesn't like the custom URI schemes I register with VSCode. I doubt raw XHR would be any better.