Изменения

Перейти к навигации Перейти к поиску
threshold
Строка 7: Строка 7:  
local lt, gt, slash, backslash = P'<', P'>', P'/', P'\\'
 
local lt, gt, slash, backslash = P'<', P'>', P'/', P'\\'
 
local colon, hyphen, equals = P':', P':', P'='
 
local colon, hyphen, equals = P':', P':', P'='
 +
 +
local max_parsed = 4 * 1024 * 1024
    
-- Service functions:
 
-- Service functions:
Строка 250: Строка 252:  
return {
 
return {
 
run = function (html)
 
run = function (html)
return serialise (grammar:match (html or ''))
+
return #html > max_parsed and html or serialise (grammar:match (html or ''))
 
end,
 
end,
 
test = function (frame)
 
test = function (frame)

Реклама:

Навигация