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

markdown-it-implicit-figures

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-implicit-figures - npm Package Compare versions

Comparing version 0.4.0 to 0.5.0

10

index.js

@@ -7,2 +7,5 @@ 'use strict';

function implicitFigures(state) {
// reset tabIndex on md.render()
var tabIndex = 1;
// do not process first and last token

@@ -58,2 +61,9 @@ for (var i=1, l=state.tokens.length; i < (l - 1); ++i) {

}
if (options.tabindex == true) {
// add a tabindex property
// you could use this with css-tricks.com/expanding-images-html5
state.tokens[i - 1].attrPush(['tabindex', tabIndex]);
tabIndex++;
}
}

@@ -60,0 +70,0 @@ }

2

package.json
{
"name": "markdown-it-implicit-figures",
"version": "0.4.0",
"version": "0.5.0",
"description": "Render images occurring by itself in a paragraph as `<figure><img ...></figure>`, similar to pandoc's implicit_figures",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -65,2 +65,6 @@ # markdown-it-implicit-figures [![Build Status](https://travis-ci.org/arve0/markdown-it-implicit-figures.svg?branch=master)](https://travis-ci.org/arve0/markdown-it-implicit-figures) [![npm version](https://badge.fury.io/js/markdown-it-implicit-figures.svg)](http://badge.fury.io/js/markdown-it-implicit-figures)

```
- `tabindex`: Set `tabindex` to `true` to add a `tabindex` property to each
figure, beginning at `tabindex="1"` and incrementing for each figure
encountered. Could be used with [this css-trick](https://css-tricks.com/expanding-images-html5/),
which expands figures upon mouse-over.

@@ -67,0 +71,0 @@

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