New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

markdown-diff

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-diff

Generate a diff between two markdown files in markdown format

Source
npmnpm
Version
1.0.9
Version published
Weekly downloads
3.3K
-66.58%
Maintainers
1
Weekly downloads
 
Created
Source

markdown-diff

This module generates a difference between two markdown files while keeping renderable in a markdown format

WIP : feel free to open pull requests

Installation

Install with npm:

$ npm install markdown-diff --save

Install with yarn:

$ yarn add markdown-diff --save

Usage

  • Import
import { markdownDiff } from 'markdown-diff';
  • Usage
const res = markdownDiff('oldStr', 'newStr');

Example

Before : Simple sentence and delete
After  : Simple sentence with insert and

Output : Simple sentence <ins>with insert </ins>and<del> delete</del>
Before : helo
After  : hello

Output : hel<ins>l</ins>o
Before :
- ele one
- ele two
After  :
- ele one
- ele two
- ele three

Output :
- ele one
- ele two
- <ins>ele three</ins>

TODO

  • Blockquote nested line

License

MIT

Keywords

diff

FAQs

Package last updated on 07 Aug 2022

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