FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Pryx/markdown-diff: Generate diference between two markdown files · GitHub

This repository was archived by the owner on Apr 18, 2024. It is now read-only.
 
 

Repository files navigation

markdown-diff

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

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>

License

MIT

About

Generate diference between two markdown files

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages


Back | FazBrowse Home | New Git URL