Quillon.Commands.List (Quillon v0.1.0)

Copy Markdown View Source

List manipulation commands.

Provides operations for working with bullet and ordered lists.

Summary

Functions

Toggle a list between bullet and ordered types.

Functions

toggle_list_type(arg)

@spec toggle_list_type(tuple()) :: tuple()

Toggle a list between bullet and ordered types.

Examples

iex> list = {:bullet_list, %{}, [{:list_item, %{}, []}]}
iex> Quillon.Commands.List.toggle_list_type(list)
{:ordered_list, %{start: 1}, [{:list_item, %{}, []}]}

iex> list = {:ordered_list, %{start: 3}, [{:list_item, %{}, []}]}
iex> Quillon.Commands.List.toggle_list_type(list)
{:bullet_list, %{}, [{:list_item, %{}, []}]}