git.iko.soy/typeable/pandoc
on master help sign in
doc/lua-filters.md: sort pandoc.List methods alphabetically
23d8108Albert Krewinkel
doc/lua-filters.md+34−34
@@ -2665,33 +2665,14 @@ methods and convenience functions.
2665
2665
2666: Returns a (shallow) copy of the list.
2666: Returns a (shallow) copy of the list.
2667
2667
2668−[`pandoc.List:new([table])`]{#pandoc.list:new}
2668+[`pandoc.List:extend (list)`]{#pandoc.list:extend}
2669−
2670−: Create a new List. If the optional argument `table` is given,
2671− set the metatable of that value to `pandoc.List`.
2672−
2673− Parameters:
2674−
2675− `table`:
2676− : table which should be treatable as a list; defaults to an
2677− empty table
2678−
2679− Returns: the updated input value
2680−
2681−[`pandoc.List:includes (needle, init)`]{#pandoc.list:includes}
2682
2669
2683−: Checks if the list has an item equal to the given needle.
2670+: Adds the given list to the end of this list.
2684
2671
2685 Parameters:
2672 Parameters:
2686
2673
2687− `needle`:
2674+ `list`:
2688− : item to search for
2675+ : list to appended
2689−
2690− `init`:
2691− : index at which the search is started
2692−
2693− Returns: true if a list item is equal to the needle, false
2694− otherwise
2695
2676
2696[`pandoc.List:find (needle, init)`]{#pandoc.list:find}
2677[`pandoc.List:find (needle, init)`]{#pandoc.list:find}
2697
2678
@@ -2725,14 +2706,33 @@ methods and convenience functions.
2725 Returns: first item for which \`test\` succeeds, or nil if
2706 Returns: first item for which \`test\` succeeds, or nil if
2726 no such item exists.
2707 no such item exists.
2727
2708
2728−[`pandoc.List:extend (list)`]{#pandoc.list:extend}
2709+[`pandoc.List:filter (pred)`]{#pandoc.list:filter}
2729
2710
2730−: Adds the given list to the end of this list.
2711+: Returns a new list containing all items satisfying a given
2712+ condition.
2731
2713
2732 Parameters:
2714 Parameters:
2733
2715
2734− `list`:
2716+ `pred`:
2735− : list to appended
2717+ : condition items must satisfy.
2718+
2719+ Returns: a new list containing all items for which \`test\`
2720+ was true.
2721+
2722+[`pandoc.List:includes (needle, init)`]{#pandoc.list:includes}
2723+
2724+: Checks if the list has an item equal to the given needle.
2725+
2726+ Parameters:
2727+
2728+ `needle`:
2729+ : item to search for
2730+
2731+ `init`:
2732+ : index at which the search is started
2733+
2734+ Returns: true if a list item is equal to the needle, false
2735+ otherwise
2736
2736
2737[`pandoc.List:map (fn)`]{#pandoc.list:map}
2737[`pandoc.List:map (fn)`]{#pandoc.list:map}
2738
2738
@@ -2744,18 +2744,18 @@ methods and convenience functions.
2744 `fn`:
2744 `fn`:
2745 : function which is applied to all list items.
2745 : function which is applied to all list items.
2746
2746
2747−[`pandoc.List:filter (pred)`]{#pandoc.list:filter}
2747+[`pandoc.List:new([table])`]{#pandoc.list:new}
2748
2748
2749−: Returns a new list containing all items satisfying a given
2749+: Create a new List. If the optional argument `table` is given,
2750− condition.
2750+ set the metatable of that value to `pandoc.List`.
2751
2751
2752 Parameters:
2752 Parameters:
2753
2753
2754− `pred`:
2754+ `table`:
2755− : condition items must satisfy.
2755+ : table which should be treatable as a list; defaults to an
2756+ empty table
2756
2757
2757− Returns: a new list containing all items for which \`test\`
2758+ Returns: the updated input value
2758− was true.
2759
2759
2760# Module pandoc.system
2760# Module pandoc.system
2761
2761