louisdh / markdown-table-gen

A script that generates a Markdown table from an array of strings for a given number of columns

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Markdown Table Generator

Travis build status Codecov
Swift Platform: iOS macOS tvOS watchOS
Twitter Donate via PayPal

This is a little script written in Swift that generates a Markdown table from an array of strings for a given number of columns.

Example

let data = ["Here's", "To", "The", "Crazy", "Ones"]

print(markdownTable(for: data, numberOfColumns: 4))
|        |        |        |        |
| ------ | ------ | ------ | ------ |
| Here's | To     | The    | Crazy  |
| Ones   |        |        |        |
Here's To The Crazy
Ones

License

This project is available under the MIT license. See the LICENSE file for more info.

About

A script that generates a Markdown table from an array of strings for a given number of columns

License:MIT License


Languages

Language:Swift 100.0%