Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

markdown-it-blockquote-cite

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-blockquote-cite

A markdown-it plugin that handles attributions in blockquotes with <cite> tags.

latest
Source
npmnpm
Version
0.1.3
Version published
Maintainers
1
Created
Source

markdown-it-blockquote-cite

This is a fork from https://github.com/bitcrowd/markdown-it-attribution which adjusts the functionality to our needs, removes most of the features we don't use and refactors the code a bit. It's a very specialized version of the original plugin, so please use at your own risk.

Namely this plugin allows to generate proper <blockquote> tags with nested <cite> tags, just like this:

> Quoted text here. Lorem ipsom etc
> More quoted text here. Lorem ipsom etc
> --- Ms. Cited Name-Here

Will be rendered as:

<blockquote>
  <p>Quoted text here. Lorem ipsum etc</p>
  <p>More quoted text here. Lorem ipsum etc</p>
  <cite>Ms. Cited Name-Here</cite>
</blockquote>

Install

yarn add bitcrowd/markdown-it-blockquote-cite#master

If you don't use yarn:

npm install --save bitcrowd/markdown-it-blockquote-cite#master

Usage

import Markdown from 'markdown-it';
import MarkdownBlockquoteCite from './markdown-it-blockquote-cite';

const mdit = new Markdown().use(MarkdownBlockquoteCite, { attributionPrefix: '---' });
const blockquote = [
  '> Quoted text here. Lorem ipsom etc',
  '> More quoted text here. Lorem ipsom etc',
  '> --- Ms. Cited Name-Here'
];

mdit.render(blockquote.join('\n'));

Options are optional, attributionPrefix defaults to --;

MIT

Keywords

markdown-it

FAQs

Package last updated on 17 Mar 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts