wip
This commit is contained in:
11
loader.py
11
loader.py
@@ -10,9 +10,9 @@ from datetime import datetime
|
||||
from mt import mt
|
||||
import gc
|
||||
|
||||
TAG_RE = re.compile(r'<[^>]+>')
|
||||
TAG_CODE = re.compile(r'<code.+</code>')
|
||||
TAG_MATH = re.compile(r'<span class="math-container".+</span>')
|
||||
TAG_RE = r'<[^>]+>'
|
||||
TAG_CODE = r'<code.+</code>'
|
||||
TAG_MATH = r'<span class="math-container".+</span>'
|
||||
|
||||
printnoln = lambda text: print(text, end='', flush=True)
|
||||
rprint = lambda text: print('\r' + text)
|
||||
@@ -289,4 +289,7 @@ def setprop(dic, key, value):
|
||||
|
||||
|
||||
def removetags(text):
|
||||
return TAG_RE.sub('', TAG_MATH.sub('', TAG_CODE.sub('', text)))
|
||||
return re.sub(TAG_RE, '',
|
||||
re.sub(TAG_MATH, '',
|
||||
re.sub(TAG_CODE, '', text, flags=re.DOTALL), flags=re.DOTALL), flags=re.DOTALL)
|
||||
# return TAG_RE.sub('', TAG_MATH.sub('', TAG_CODE.sub('', text)))
|
||||
|
||||
Reference in New Issue
Block a user