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

remark-captions

Package Overview
Dependencies
Maintainers
1
Versions
44
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

remark-captions

This plugin enhance mdast quotation to add the source of quotation.

  • 0.0.14
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
750
decreased by-5.3%
Maintainers
1
Weekly downloads
 
Created
Source

This plugin enhance mdast quotation to add the source of quotation.

This is enabled by adding Source: at the end of quote bloque e.g:

> Do it or do it not, there is no try
Source: A little green man, with a saber larger than himself

This removes the Source from the tree and add a author attribute to the blockquote element.

This plugin also enables "external caption" which can be configured through the opts object passed to plugin.

This object has to be formed as a dictionary associating the type of node to caption and the prefix.

By default, it features :

const legendBlock = {
  table: 'Table:',
  code: 'Code:',
}

This enables you to deal with such a code:

```
a_highlighted_code('blah')
```
Code: My code caption

Table are also supported with such a code :

head1| head2
-----|------
bla|bla
Table: figcapt1

Associated with remark-rehype this generates a HTML tree encapsulated inside <figure> tag

<figure>
  <table>
    <thead>
      <tr>
        <th>head1</th>
        <th>head2</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td>bla</td>
        <td>bla</td>
      </tr>
    </tbody>
  </table>
  <figcaption>figcapt1</figcaption>
</figure>

Keywords

FAQs

Package last updated on 03 Jul 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