artlebedev typograph fallback for big pages
This commit is contained in:
1 parent
b9277795cf
commit
58c317cc61
1 file changed
+5
-1
@@ -98,7 +98,11 @@ def html_from_tree(tree):
|
|||||||
|
|
||||||
async def typo(text):
|
async def typo(text):
|
||||||
from kazimir import artlebedev
|
from kazimir import artlebedev
|
||||||
return await artlebedev.typograf(text)
|
result = await artlebedev.typograf(text)
|
||||||
|
if result == 'Размер текста ограничен 32 КБ':
|
||||||
|
return text
|
||||||
|
|
||||||
|
return result
|
||||||
# url = 'http://www.typograf.ru/webservice/'
|
# url = 'http://www.typograf.ru/webservice/'
|
||||||
# params = dict(text=text)
|
# params = dict(text=text)
|
||||||
# return await request.post(url, params, {'chr': 'utf-8'})
|
# return await request.post(url, params, {'chr': 'utf-8'})
|
||||||
|
|||||||
Reference in new issue
Block a user