diff --git a/MLPApi.py b/MLPApi.py index 29e199d..d670ce9 100644 --- a/MLPApi.py +++ b/MLPApi.py @@ -63,15 +63,17 @@ def markdown2html(md, basepath): # I personaly edited the file (markdown2.py:1743) html = strip_html_comments(html) - # Beautiful uses the
but the sublime phantoms do not support them... + # exception, again, because
 aren't supported by the phantoms
+    # so, because this is monosaped font, I just replace it with a '.' and make transparent ;)
+    html = html.replace(' ', '.')
+
+    # Phantoms have problem with images size when they're loaded from an url/path
+    # So, the solution is to convert them to base64
+    html = replace_img_src_base64(html, basepath=os.path.dirname(basepath))
+
+    # BeautifulSoup uses the 
but the sublime phantoms do not support them... html = html.replace('
', '
') - html = html.replace(' ', ' espace;') # save where are the spaces - - # exception, again, because
 aren't supported by the phantoms
-    html = html.replace(' espace;', '.')
-    html = replace_img_src_base64(html, basepath=os.path.dirname(basepath))
-    sublime.set_clipboard(html)
     return html
 
 def show_html(md_view, preview):
diff --git a/MarkdownLivePreview.tasks b/MarkdownLivePreview.tasks
index 5ede7fe..3af2659 100644
--- a/MarkdownLivePreview.tasks
+++ b/MarkdownLivePreview.tasks
@@ -1,5 +1,6 @@
 Fast:
   ☐ cache image in object when used, so that it's faster @needsTest
+  ☐ add settings to keep md view open #13
 
 Medium:
   ☐ auto refresh preview if loading images
diff --git a/functions.py b/functions.py
index ace0776..163c841 100644
--- a/functions.py
+++ b/functions.py
@@ -19,29 +19,21 @@ def strip_html_comments(html):
 
 def replace_img_src_base64(html, basepath):
     """Really messy, but it works (should be updated)"""
-    index = -1
-    tag_start = '` | `><`  |
 
-[Sublime Text Logo](https://upload.wikimedia.org/wikipedia/en/4/4c/Sublime_Text_Logo.png)
+![Sublime Text Logo](https://upload.wikimedia.org/wikipedia/en/4/4c/Sublime_Text_Logo.png)
 
 Some plugin I just *need*: