Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paperist/remark-table-caption

Package Overview
Dependencies
Maintainers
2
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paperist/remark-table-caption

wooorm/remark plugin for table caption

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
2
Created
Source

@paperist/remark-table-caption

LICENSE NPM standard-readme compliant

wooorm/remark plugin for table caption

Support Pandoc's table caption at wooorm/remark.

Table of Contents

Install

npm i remark @paperist/remark-table-caption

Usage

const unified = require('unified');
const parser = require('remark-parse');
const tableCaption = require('@paperist/remark-table-caption');

const markdown = `
| Right | Left | Default | Center |
|------:|:-----|---------|:------:|
|   12  |  12  |    12   |    12  |
|  123  |  123 |   123   |   123  |
|    1  |    1 |     1   |     1  |

Table: Demonstration of pipe table syntax.
`;

const processor = unified().use(parser).use(tableCaption);
const ast = processor.parse(markdown);

processor.run(ast).then(ast => {
  console.dir(ast, { depth: null });
});

AST

See also mdast, unist.

TableCaption

TableCaption extends [Parent][unist-parnet].

interface TableCaption extends Parent {
  type: 'tableCaption';
}

For example, the following markdown:

Table: Caption {#tbl:label}

Yields:

{
  "type": "tableCaption",
  "children": [
    {
      "type": "text",
      "value": "Caption "
    },
    {
      "type": "crossReferenceLabel",
      "value": "{#tbl:lable}",
      "label": "tbl:label",
      "options": {}
    }
  ]
}

Contribute

PRs accepted.

License

3846masa MIT (c) 3846masa

Keywords

FAQs

Package last updated on 08 Aug 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc