Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

允许插入多个元素在指定列表元素之前 allow insert multiple elements before specified list element #949

Open
iamqiz opened this issue Nov 2, 2024 · 0 comments

Comments

@iamqiz
Copy link

iamqiz commented Nov 2, 2024

Is your feature request related to a problem? Please describe.
我想在第一个列表元素之前插入2个新元素
I want to insert 2 new list elements before first list element ,
我是这么写的:
so i use following patch:

patch:
    engine/translators/@before 0: "lua_translator@aa_translator"
    engine/translators/@before 0: "lua_translator@bb_translator"

但是这只插入了一个元素
but this only insert 1 element into list

Describe the solution you'd like
希望增加一个新的patch语法@insertBefore n,n可以是0 1 2 ... last,
add a new patch syntax, @insertBefore n , the n can be 0,1,2 ...last
它可以在索引为n的元素前插入多个新元素
it will insert multiple elements before the element that has index n

patch:
  engine/translators/@insertBefore 0: 
    - "lua_translator@aa_translator"
    - "lua_translator@bb_translator"

类似/+,但是它可以在列表任意地方插入多个元素(除了在列表结尾)
like /+, but it can insert multiple element anythere (except at the ending of list)
这个语法将会是/+的完美补充
@insertBefore n will be a perfect supplement of /+
感谢!
thanks!

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

@iamqiz iamqiz changed the title allow insert multiple elements before specified list element 允许插入多个元素在指定列表元素之前 allow insert multiple elements before specified list element Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant