markdown-it-attrs
Advanced tools
Comparing version 2.3.0 to 2.3.1
@@ -572,3 +572,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){ | ||
// switch to reading value if equal sign | ||
if (char_ === keySeparator) { | ||
if (char_ === keySeparator && parsingKey) { | ||
parsingKey = false; | ||
@@ -575,0 +575,0 @@ continue; |
{ | ||
"name": "markdown-it-attrs", | ||
"version": "2.3.0", | ||
"version": "2.3.1", | ||
"description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -155,7 +155,7 @@ # 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) | ||
## Custom Delimiter | ||
## Custom delimiters | ||
You can configure `markdown-it-attrs` to use a different delimeter to declare attributes. | ||
To use different delimiters then the default, add configuration for `leftDelimiter` and `rightDelimiter`: | ||
```javascript | ||
```js | ||
md.use(attrs, { | ||
@@ -167,8 +167,16 @@ leftDelimiter: '[', | ||
```markdown | ||
# Title [.large] | ||
Which will render | ||
```md | ||
# title [.large] | ||
``` | ||
as | ||
```html | ||
<h1 class="large">title</h1> | ||
``` | ||
## License | ||
MIT © [Arve Seljebu](http://arve0.github.io/) |
@@ -33,3 +33,3 @@ 'use strict'; | ||
// switch to reading value if equal sign | ||
if (char_ === keySeparator) { | ||
if (char_ === keySeparator && parsingKey) { | ||
parsingKey = false; | ||
@@ -36,0 +36,0 @@ continue; |
52852
181