# surcouche-remark-grid-table

> convert quick-writing table syntax to markdown table syntax

Latest version **0.0.1** (published 2020-08-07) · GPL-3.0-or-later license · 0 weekly downloads

## Install

```sh
npm install surcouche-remark-grid-table
pnpm add surcouche-remark-grid-table
yarn add surcouche-remark-grid-table
bun add surcouche-remark-grid-table
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.1 |
| Published | 2020-08-07 |
| First published | 2020-08-07 |
| Weekly downloads | 0 |
| License | GPL-3.0-or-later |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 43.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | drulac |

## Links

- npm: https://www.npmjs.com/package/surcouche-remark-grid-table
- npm.io page: https://npm.io/package/surcouche-remark-grid-table

## Dependencies (1)

- [string-width](https://npm.io/package/string-width.md) ^4.2.0

## Recent versions

- 0.0.1 (latest) — 2020-08-07

## README

# surcouche-remark-grid-table

convert quick-writing table syntax to markdown table syntax

## syntax

- lines don't need to have the same length
- cell must have more than 3 chars
- use `#` to increase the number of columns taken by the cell, not required for the last cell of a row
- use `|` as cell separator
- use `----` as line separator
- use `====` to separate header from body of table

tables are extracted from markdown by the plugin

## code sample

```js
const convert = require('surcouche-remark-grid-table')

const markdown = `
# test

you can pass your entire markdown, tables are extracted from markdown by the plugin

-------------------------
 Table Headings  #| Here 
-------------------------
 Sub   | Headings |  Too  
=========================
 cell  | column spanning 
 spans |-----------------
 rows  | normal   | cell 
-------------------------
 rows  | lonnggggggggg   | cell 
-------|----------| end
 rows    normal  #| cell 
------------------------
 rows  | normal   | cell 
-------------------------
 multi | cells can be    
 multi | *formatted*     
 line  | *formatted*     
       | **paragraphs**  
 cells |                 
 too   |  $(a+b)^2 = a^2 + b^2 + 2*a*b$              
-------------------------

`

console.log(convert(markdown))
```

output the markdown with well formated tables :

``` markdown
# test

you can pass your entire markdown, tables are extracted from markdown by the plugin

+-------+---------------+---------------+
|     Table Headings    |      Here     |
+-------+---------------+---------------+
|  Sub  |    Headings   |      Too      |
+=======+===============+===============+
|  cell |        column spanning        |
| spans +---------------+---------------+
|  rows |     normal    |      cell     |
+-------+---------------+---------------+
|  rows | lonnggggggggg |      cell     |
+-------+---------------+      end      |
|     rows    normal    |      cell     |
+-------+---------------+---------------+
|  rows |     normal    |      cell     |
+-------+---------------+---------------+
| multi |          cells can be         |
| multi |          *formatted*          |
|  line |          *formatted*          |
|       |         **paragraphs**        |
| cells |                               |
|  too  | $(a+b)^2 = a^2 + b^2 + 2*a*b$ |
+-------+---------------+---------------+
```

---
_Source: https://npm.io/package/surcouche-remark-grid-table · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
