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

markdown-it-directive

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-directive - npm Package Compare versions

Comparing version 2.0.0 to 2.0.1

2

package.json
{
"name": "markdown-it-directive",
"version": "2.0.0",
"version": "2.0.1",
"description": "Directive extension for markdown-it markdown parser.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -69,3 +69,3 @@ # markdown-it-directive

.use((md) => {
md.inlineDirectives['directive-name'] = (state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd) => {
md.inlineDirectives['directive-name'] = ({state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd}) => {
const token = state.push('html_inline', '', 0);

@@ -75,3 +75,3 @@ token.content = JSON.stringify({ directive: 'directive-name', content, dests, attrs }) + '\n';

md.blockDirectives['directive-name'] = (
md.blockDirectives['directive-name'] = ({
state, content, contentTitle, inlineContent, dests, attrs,

@@ -82,3 +82,3 @@ contentStartLine, contentEndLine,

directiveStartLine, directiveEndLine
) => {
}) => {
const token = state.push('html_block', '', 0);

@@ -85,0 +85,0 @@ token.map = [ directiveStartLine, directiveEndLine ];

@@ -13,2 +13,6 @@ # markdown-it-directive

## 所需依赖
需要提前安装 `markdown-it`, `@types/markdown-it` ,详情参见 `package.json` 中的 `peerDependencies` 部分。
## API

@@ -20,7 +24,7 @@

.use((md) => {
md.inlineDirectives['aaa'] = (state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd) => {
md.inlineDirectives['aaa'] = ({state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd}) => {
//
};
md.blockDirectives['aaa'] = (
md.blockDirectives['aaa'] = ({
state, content, contentTitle, inlineContent, dests, attrs,

@@ -31,3 +35,3 @@ contentStartLine, contentEndLine,

directiveStartLine, directiveEndLine
) => {
}) => {
//

@@ -66,3 +70,3 @@ };

.use((md) => {
md.inlineDirectives['directive-name'] = (state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd) => {
md.inlineDirectives['directive-name'] = ({state, content, dests, attrs, contentStart, contentEnd, directiveStart, directiveEnd}) => {
const token = state.push('html_inline', '', 0);

@@ -72,3 +76,3 @@ token.content = JSON.stringify({ directive: 'directive-name', content, dests, attrs }) + '\n';

md.blockDirectives['directive-name'] = (
md.blockDirectives['directive-name'] = ({
state, content, contentTitle, inlineContent, dests, attrs,

@@ -79,3 +83,3 @@ contentStartLine, contentEndLine,

directiveStartLine, directiveEndLine
) => {
}) => {
const token = state.push('html_block', '', 0);

@@ -82,0 +86,0 @@ token.map = [ directiveStartLine, directiveEndLine ];

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