Skip to content

mouradk78/remarkable-classy

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

remarkable-classy

NOTE: Development for this plugin has been stopped in favour of markdown-it-classy.

This is a plugin for the remarkable markdown parser.

Need to style some text written with markdown but are lacking that extra oomph? Plug in remarkable-classy to make your markup remarkable and classy.

Install

$ npm install --save remarkable-classy

Plug

var classy = require("remarkable-classy"),
  Remarkable = require("remarkable"),
  md = new Remarkable();

md.use(classy);

Use

Anything in curly brackets ({}) gets interpreted as a class string for that element.

This is paragraph 1.

This is paragraph 2 and I wish there was a way to make it blue.
{blue}

converts to:

<p>This is paragraph 1.</p>

<p class="blue">This is paragraph 2 and I wish there was a way to make it blue.</p>

Go crazy (or not)

# All kinds of headings work! {classy}

## Atx... {classy} ##

... and Setext {classy}
---

_em {classy}_ and __strong {classy}__ are supported as well.
{classy}

- so
- are
- ul tags
{classy}

> blockquotes?
> {classy}
>
> why not!
{classy}

converts to:

<h1 class="classy">All kinds of headings work!</h1>

<h2 class="classy">Atx...</h2>

<h2 class="classy">... and Setext</h2>

<p class="classy"><em class="classy">em</em> and <strong class="classy">strong</strong> are supported as well.

<ul class="classy">
	<li>so</li>
	<li>are</li>
	<li>ul tags</li>
</ul>

<blockquote class="classy">
	<p class="classy">blockquotes?</p>
	<p>why not!</p>
</blockquote>

Very classy indeed!

About

Easily add classes to your markdown

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 100.0%