Модуль:Loc/Marking: различия между версиями
Pok (обсуждение | вклад) Нет описания правки |
Pok (обсуждение | вклад) Нет описания правки |
||
| Строка 91: | Строка 91: | ||
local processed = line | local processed = line | ||
local handled = false | local handled = false | ||
local line_unescaped = mw.ustring.gsub(line, " ", " ") | |||
if enable_numeric then | if enable_numeric then | ||
local leading, num, rest = mw.ustring.match( | local leading, num, rest = mw.ustring.match(line_unescaped, "^(%s*)(%d+)%.%s*(.*)$") | ||
if num then | if num then | ||
local indent = mw.ustring.len(leading or "") | local indent = mw.ustring.len(leading or "") | ||
| Строка 103: | Строка 104: | ||
end | end | ||
if not handled then | if not handled then | ||
local leading, rest = mw.ustring.match( | local leading, rest = mw.ustring.match(line_unescaped, "^(%s*)%-%s+(.*)$") | ||
if rest then | if rest then | ||
local indent = mw.ustring.len(leading or "") | local indent = mw.ustring.len(leading or "") | ||
| Строка 178: | Строка 179: | ||
text = mw.text.unstripNoWiki(text) | text = mw.text.unstripNoWiki(text) | ||
text = process_nowiki_equals(text) | text = process_nowiki_equals(text) | ||
return transform(text) | return frame:preprocess(transform(text)) | ||
end | end | ||
return p | return p | ||