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:
twanvl
2008-07-22 22:46:04 +00:00
parent 4a8c4ba14b
commit 13a37f4734
11 changed files with 146 additions and 65 deletions
+4 -1
View File
@@ -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]
+1 -1
View File
@@ -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.