clean code/files
This commit is contained in:
@ -1,5 +1,5 @@
|
|||||||
html {
|
html {
|
||||||
--light-bg: color(var(--background) blend(#999 85%))
|
--light-bg: color(var(--background) blend(#999 85%));
|
||||||
}
|
}
|
||||||
body {
|
body {
|
||||||
padding:10px;
|
padding:10px;
|
||||||
|
|||||||
@ -2,9 +2,7 @@
|
|||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
__all__ = [
|
__all__ = ['escape_amp']
|
||||||
'escape_amp'
|
|
||||||
]
|
|
||||||
|
|
||||||
RE_REPLACE_AMPERSAND = re.compile(r'&(\w*)(;)?')
|
RE_REPLACE_AMPERSAND = re.compile(r'&(\w*)(;)?')
|
||||||
|
|
||||||
@ -27,11 +25,14 @@ def run_tests():
|
|||||||
fails = 0
|
fails = 0
|
||||||
for i, (subject, result) in enumerate(tests):
|
for i, (subject, result) in enumerate(tests):
|
||||||
if RE_REPLACE_AMPERSAND.sub(replace, subject) != result:
|
if RE_REPLACE_AMPERSAND.sub(replace, subject) != result:
|
||||||
|
# CSW: ignore
|
||||||
print('TEST FAIL ({i}): {subject!r} escaped did not match {result!r}'.format(**locals()))
|
print('TEST FAIL ({i}): {subject!r} escaped did not match {result!r}'.format(**locals()))
|
||||||
fails += 1
|
fails += 1
|
||||||
if fails == 0:
|
if fails == 0:
|
||||||
|
# CSW: ignore
|
||||||
print("SUCCESS: every tests ({}) passed successfully!".format(len(tests)))
|
print("SUCCESS: every tests ({}) passed successfully!".format(len(tests)))
|
||||||
else:
|
else:
|
||||||
|
# CSW: ignore
|
||||||
print("{} test{} failed".format(fails, 's' if fails > 1 else ''))
|
print("{} test{} failed".format(fails, 's' if fails > 1 else ''))
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
# -*- encoding: utf-8 -*-
|
# -*- encoding: utf-8 -*-
|
||||||
|
|
||||||
import os.path
|
import os.path
|
||||||
|
import tempfile
|
||||||
|
import sublime
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
import urllib.request, urllib.error
|
import urllib.request, urllib.error
|
||||||
import sublime
|
|
||||||
from .functions import *
|
from .functions import *
|
||||||
import tempfile
|
|
||||||
|
|
||||||
CACHE_FILE = os.path.join(tempfile.gettempdir(),
|
CACHE_FILE = os.path.join(tempfile.gettempdir(),
|
||||||
'MarkdownLivePreviewCache.txt')
|
'MarkdownLivePreviewCache.txt')
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
1
imgs/README.md
Normal file
1
imgs/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
There is images here, allthough they aren't of any use for the plugin. They're just the image that I used to generate the base64 (404.txt and loading.txt)
|
||||||
|
Before Width: | Height: | Size: 953 B After Width: | Height: | Size: 953 B |
Reference in New Issue
Block a user