docs: modify readme file
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
local M = {}
|
||||
|
||||
M.component = function(field)
|
||||
M.component = function(field, max_size)
|
||||
if field.translation then
|
||||
local ref = {
|
||||
{ '中文翻译', 'TransRef' }
|
||||
@@ -12,8 +12,13 @@ M.component = function(field)
|
||||
emptyline = true,
|
||||
needformat = true,
|
||||
}
|
||||
local size = 0
|
||||
for trans in vim.gsplit(field.translation, '\n', true) do
|
||||
size = size + 1
|
||||
table.insert(translations, trans)
|
||||
if size == max_size then
|
||||
break
|
||||
end
|
||||
end
|
||||
|
||||
return { ref, translations }
|
||||
|
Reference in New Issue
Block a user