Naivete Precedes Misrepresentation
    Wondering what’s next for npm?Check out our public roadmap! »

    markdown-escape

    1.1.0 • Public • Published

    Escape Markdown control characters.

    var escape = require('markdown-escape')
    var assert = require('assert')
     
    assert(escape("#1! We're #1!") === "\\#1! We're \\#1!")
    assert(escape("http://example.com") === 'http:\\/\\/example.com')
    assert(escape('one (1)') === 'one \\(1\\)')
     
    // Skip escaping specific characters.
    assert(escape('one (1)', ['parentheses']) === 'one (1)')
    assert(escape("http://example.com", ['slashes']) === 'http://example.com')

    Install

    npm i markdown-escape

    DownloadsWeekly Downloads

    3,145

    Version

    1.1.0

    License

    MIT

    Unpacked Size

    2.9 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar