Socket
Socket
Sign inDemoInstall

markdown-it-attrs

Package Overview
Dependencies
0
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.1.2 to 0.1.3

7

demo.md

@@ -1,6 +0,1 @@

+ Videre skal vi gjøre det slik at det ser ut som om katten flyr mot
jorda. Det gjør vi ved å endre størrelsen slik at katten blir mindre
jo nærmere den kommer jordkloden.
Klikk på katten i figurlisten. Legg `sett størrelse
til`{jej=noo} ned
- **bold** text {.red}

6

index.js

@@ -63,3 +63,7 @@ 'use strict';

utils.addAttrs(attrs, firstTokenNotHidden(tokens, i - 1));
last(inlineTokens).content = content.slice(0, curlyStart).trim();
if (content[curlyStart - 1] === ' ') {
// trim space before {}
curlyStart -= 1;
}
last(inlineTokens).content = content.slice(0, curlyStart);
}

@@ -66,0 +70,0 @@

{
"name": "markdown-it-attrs",
"version": "0.1.2",
"version": "0.1.3",
"description": "Add classes, identifiers and attributes to your markdown with {} curly brackets, similar to pandoc's header attributes",

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

@@ -43,2 +43,16 @@ # 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)

If you need the class to apply to the list item instead:
```md
- list item **bold**
{.red}
```
Output:
```html
<ul>
<li class="red">list item <strong>bold</strong>
</li>
</ul>
```
If you need finer control, look into [decorate](https://github.com/rstacruz/markdown-it-decorate).

@@ -45,0 +59,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc