Module:CSVToBulletList/doc

From Dune: Awakening Community Wiki
Jump to navigation Jump to search

This is the documentation page for Module:CSVToBulletList

Module:CSVToBulletList

Converts a comma-separated string into a wikitext bullet list. Each comma-delimited value becomes its own `*` list item, with surrounding whitespace trimmed.

Usage

Core functionality

{{#invoke:CSVToBulletList|main|Item 1, Item 2, Item 3}}

Output:

* Item 1
* Item 2
* Item 3

Convert each item into wikilink

{{#invoke:CSVToBulletList|main|Item 1, Item 2, Item 3|link=true}}

Output:

* [[Item 1]]
* [[Item 2]]
* [[Item 3]]


Parameters

main

1
string
A comma-separated string containing the items to convert into a bullet list.
link (optional)
boolean
If specified with a truthy value, each item will be wrapped in double square brackets, rendering it as a wikilink.
Valid values:
true
yes
1

Notes

  • Empty items are ignored (e.g. `A,,B` becomes `A` and `B`).
  • If the input contains no commas, it will still be returned as a bullet list with a single `*` item.