All Projects → remarkjs → strip-markdown

remarkjs / strip-markdown

Licence: MIT License
plugin remove Markdown formatting

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to strip-markdown

remark-footnotes
Legacy plugin to add support for pandoc footnotes — please use `remark-gfm` instead
Stars: ✭ 38 (-54.76%)
Mutual labels:  remark, remark-plugin
transformer-oembed
@remark-embedder transformer for oEmbed supported links
Stars: ✭ 25 (-70.24%)
Mutual labels:  remark, remark-plugin
remark-hint
Sprinkle hints/tips/warnings on your documents
Stars: ✭ 36 (-57.14%)
Mutual labels:  remark, remark-plugin
twoslash
You take some Shiki, add a hint of TypeScript compiler, and 🎉 incredible static code samples
Stars: ✭ 596 (+609.52%)
Mutual labels:  remark, remark-plugin
remark-external-links
Legacy plugin to automatically add target and rel attributes to external links — please use `rehype-external-links` instead
Stars: ✭ 50 (-40.48%)
Mutual labels:  remark, remark-plugin
remove-files-webpack-plugin
A plugin for webpack that removes files and folders before and after compilation.
Stars: ✭ 48 (-42.86%)
Mutual labels:  clean, remove
remark-highlight.js
Legacy plugin to highlight code blocks with highlight.js — please use `rehype-highlight` instead
Stars: ✭ 58 (-30.95%)
Mutual labels:  remark, remark-plugin
remark-directive
remark plugin to support directives
Stars: ✭ 137 (+63.1%)
Mutual labels:  remark, remark-plugin
remark-slate-transformer
remark plugin to transform remark syntax tree (mdast) to Slate document tree, and vice versa. Made for WYSIWYG markdown editor.
Stars: ✭ 62 (-26.19%)
Mutual labels:  remark, remark-plugin
remark-admonitions
Add admonitions support to Remarkable
Stars: ✭ 90 (+7.14%)
Mutual labels:  remark, remark-plugin
remark-man
plugin to compile markdown to man pages
Stars: ✭ 87 (+3.57%)
Mutual labels:  remark, remark-plugin
remark-license
plugin to generate a license section
Stars: ✭ 15 (-82.14%)
Mutual labels:  remark, remark-plugin
remark-autolink-headings
Legacy remark plugin to automatically add links to headings — please use `rehype-autolink-headings` instead
Stars: ✭ 63 (-25%)
Mutual labels:  remark, remark-plugin
remark-frontmatter
remark plugin to support frontmatter (YAML, TOML, and more)
Stars: ✭ 167 (+98.81%)
Mutual labels:  remark, remark-plugin
remark-bookmarks
plugin to manage links
Stars: ✭ 15 (-82.14%)
Mutual labels:  remark, remark-plugin
emoji-strip
Strip emoji from a string in Node.js and browsers.
Stars: ✭ 73 (-13.1%)
Mutual labels:  strip, remove
Dropcss
An exceptionally fast, thorough and tiny unused-CSS cleaner
Stars: ✭ 2,102 (+2402.38%)
Mutual labels:  clean, remove
cache
A cache for @remark-embedder
Stars: ✭ 12 (-85.71%)
Mutual labels:  remark, remark-plugin
remark-embed-images
plugin to embed local images as data URIs
Stars: ✭ 23 (-72.62%)
Mutual labels:  remark, remark-plugin
remark-behead
Remark plugin to increase or decrease markdown heading weight.
Stars: ✭ 14 (-83.33%)
Mutual labels:  remark, remark-plugin

strip-markdown

Build Coverage Downloads Size Sponsors Backers Chat

remark plugin remove markdown formatting. This essentially removes everything but paragraphs and text nodes.

This is one of the first remark plugins, before prefixing with remark- got cool.

Note!

This plugin is ready for the new parser in remark (remarkjs/remark#536). No change is needed: it works exactly the same now as it did before!

Install

This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

npm:

npm install strip-markdown

Use

import {remark} from 'remark'
import strip from 'strip-markdown'

remark()
  .use(strip)
  .process('Some *emphasis*, **importance**, and `code`.')
  .then((file) => {
    console.log(String(file))
  })

Yields:

Some emphasis, importance, and code.

API

This package exports no identifiers. The default export is stripMarkdown.

unified().use(stripMarkdown[, options])

Plugin remove markdown formatting.

  • Removes html (note), code, horizontalRule, table, yaml, toml, and their content
  • Render everything else as simple paragraphs without formatting
  • Uses alt text for images

Security

Use of strip-markdown does not involve rehype (hast) or user content so there are no openings for cross-site scripting (XSS) attacks.

Contribute

See contributing.md in remarkjs/.github for ways to get started. See support.md for ways to get help.

This project has a code of conduct. By interacting with this repository, organization, or community you agree to abide by its terms.

License

MIT © Titus Wormer

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].