markdown-it-attrs
Advanced tools
Comparing version 3.0.3 to 4.0.0
@@ -1,1 +0,1 @@ | ||
{"processes":{"e9cac330-82cc-495e-b882-364df3ce6e5f":{"parent":null,"children":[]}},"files":{"/Users/arve/git/markdown-it-attrs/index.js":["e9cac330-82cc-495e-b882-364df3ce6e5f"],"/Users/arve/git/markdown-it-attrs/patterns.js":["e9cac330-82cc-495e-b882-364df3ce6e5f"],"/Users/arve/git/markdown-it-attrs/utils.js":["e9cac330-82cc-495e-b882-364df3ce6e5f"]},"externalIds":{}} | ||
{"processes":{"6ac99b78-add1-4cd8-b0f7-5c9698755b00":{"parent":null,"children":[]}},"files":{"/Users/arve/git/markdown-it-attrs/index.js":["6ac99b78-add1-4cd8-b0f7-5c9698755b00"],"/Users/arve/git/markdown-it-attrs/patterns.js":["6ac99b78-add1-4cd8-b0f7-5c9698755b00"],"/Users/arve/git/markdown-it-attrs/utils.js":["6ac99b78-add1-4cd8-b0f7-5c9698755b00"]},"externalIds":{}} |
12
debug.js
@@ -5,11 +5,13 @@ /* eslint-env es6 */ | ||
md.use(markdownItAttrs, { | ||
leftDelimiter: '{{', | ||
rightDelimiter: '}}' | ||
}).use(require('../markdown-it-implicit-figures')); | ||
md.use(markdownItAttrs).use(require('../markdown-it-implicit-figures')); | ||
let src = 'asdf *asd*{{.c}} khg'; | ||
let src = `header1 | header2 | ||
------- | ------- | ||
column1 | column2 | ||
{.special} | ||
`; | ||
let res = md.render(src); | ||
console.log(res); // eslint-disable-line |
@@ -312,2 +312,3 @@ (function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.markdownItAttrs = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){ | ||
* | c1 | | ||
* | ||
* {.c} | ||
@@ -314,0 +315,0 @@ */ |
{ | ||
"name": "markdown-it-attrs", | ||
"version": "3.0.3", | ||
"version": "4.0.0", | ||
"description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes", | ||
@@ -46,3 +46,3 @@ "main": "index.js", | ||
"eslint": "^5.16.0", | ||
"markdown-it": "^11.0.0", | ||
"markdown-it": "^12.0.2", | ||
"markdown-it-implicit-figures": "^0.9.0", | ||
@@ -53,5 +53,5 @@ "mocha": "^7.1.1", | ||
"peerDependencies": { | ||
"markdown-it": ">= 9.0.0 < 12.0.0" | ||
"markdown-it": ">= 9.0.0 < 13.0.0" | ||
}, | ||
"tonicExampleFilename": "demo.js" | ||
} |
@@ -78,2 +78,3 @@ 'use strict'; | ||
* | c1 | | ||
* | ||
* {.c} | ||
@@ -80,0 +81,0 @@ */ |
@@ -177,2 +177,29 @@ # markdown-it-attrs [![Build Status](https://travis-ci.org/arve0/markdown-it-attrs.svg?branch=master)](https://travis-ci.org/arve0/markdown-it-attrs) [![npm version](https://badge.fury.io/js/markdown-it-attrs.svg)](http://badge.fury.io/js/markdown-it-attrs) [![Coverage Status](https://coveralls.io/repos/github/arve0/markdown-it-attrs/badge.svg?branch=master)](https://coveralls.io/github/arve0/markdown-it-attrs?branch=master) | ||
Similar for tables, attributes must be _two_ new lines below: | ||
```md | ||
header1 | header2 | ||
------- | ------- | ||
column1 | column2 | ||
{.special} | ||
``` | ||
Output: | ||
```html | ||
<table class="special"> | ||
<thead> | ||
<tr> | ||
<th>header1</th> | ||
<th>header2</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>column1</td> | ||
<td>column2</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
``` | ||
If you need finer control, [decorate](https://github.com/rstacruz/markdown-it-decorate) might help you. | ||
@@ -179,0 +206,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
273
109453
19
1508