Viewing images works for local files

We have to make sure that everything is converted to base64 (and
replaced in the src attribute) because otherwise ST3 messes up the
height of the images
This commit is contained in:
Mathieu PATUREL
2019-11-14 17:28:02 +11:00
parent 5738f6b5ff
commit bae26fc452
6 changed files with 111 additions and 16 deletions

20
live-testing/test.md Normal file
View File

@ -0,0 +1,20 @@
# hello world
This is a *test*.
I'm not sure that it **actually** going to work, but it seems nicer than the [previous version][prev]
This is the first image from the local file system (absolute path, sorry):
![The sublime text logo!](file:///home/math2001/.config/sublime-text-3/Packages/MarkdownLivePreview2/live-testing/sublime_text.png)
This is the first image from the local file system, *relative* path!
![The sublime text logo!](sublime_text.png)
This is the first image from the internet!
![The sublime text logo!](https://www.sublimehq.com/images/sublime_text.png)
[prev]: https://github.com/math2001/MarkdownLivePreview/tree/d4c477749ce7e77b8e9fc85464a2488f003c45bc