mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-10 04:57:00 -04:00
Simplified compilation of 'assert' pseudo function;
Added remove_duplicates flag to sort_list function; Fixed documentation of <size:> tag git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1028 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -10,9 +10,12 @@ Optionally order by some other property.
|
||||
! Parameter Type Description
|
||||
| @input@ [[type:list]] or [[type:set]] List to sort.
|
||||
| @order_by@ [[type:function]] (optional) Function to order by, for example when @order_by: {input.name}@ orders items by their name property.
|
||||
| @remove_duplicates@ [[type:boolean]] DOC_MSE_VERSION: since 0.3.7
|
||||
If @true@, keep only one copy of duplicate elements.
|
||||
|
||||
--Examples--
|
||||
> sort_list([5,2,3,1,4]) == [1,2,3,4,5]
|
||||
> sort_list(["aaa","cccc","bb"]) == ["aaa","bb","cccc"]
|
||||
> sort_list(["aaa","cccc","bb"], order_by: {number_of_items(in:input)})
|
||||
> sort_list(["aaa","cccc","bb"], order_by: length)
|
||||
> == ["bb","aaa","cccc"]
|
||||
> sort_list([1,2,1,2,2,3], remove_duplicates:true) == [1,2,3]
|
||||
|
||||
@@ -16,7 +16,7 @@ This is written as the character with code 1 in files.
|
||||
| @"<i>"@ The text inside the tag is italic.
|
||||
| @"<sym>"@ The text inside the tag is rendered as symbols, if a [[prop:style:symbol font]] is set for the text box.
|
||||
| @"<color:???>"@ The text inside the tag is rendered with the given [[type:color]].
|
||||
| @"<size:???>"@ The text inside the tag is scaled by the a factor, for example @"<size:2>text</size>"@ makes the text twice as large.
|
||||
| @"<size:???>"@ The text inside the tag is rendered with the given font size in points, for example @"<size:12>text</size>"@ makes the text 12 points. The text is scaled down proportianally when it does not fit in a text box and the @scale down to@ attribute allows it.
|
||||
| @"<line>"@ Line breaks inside this tag use the [[prop:style:line height line]], and they show a horizontal line.
|
||||
| @"<soft-line>"@ Line breaks inside this tag use the [[prop:style:soft line height]].
|
||||
| @"<atom>"@ An atomic piece of text. The cursor can never be inside it; it is selected as a whole.
|
||||
|
||||
Reference in New Issue
Block a user