Skip to content
This repository has been archived by the owner on Aug 2, 2020. It is now read-only.

Removes excess indentation from the contents of pre tags, allowing proper indentation in HTML.

License

Notifications You must be signed in to change notification settings

neogeek-deprecated/de-pre.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

de-pre.js

Removes excess indentation from the contents of pre tags, allowing proper indentation in HTML.

Greenkeeper badge

Usage

depre('pre');

Take for example the following pre tag nested inside a div:

<div>
    <pre>
    {
        "name": "CanvasToVideo",
        "description": "An experiment in converting Canvas animations to video.",
        "main": "CanvasToVideo.js"
    }
    </pre>
</div>

The contents of the pre tag will render like this when viewed in a browser.

    {
        "name": "CanvasToVideo",
        "description": "An experiment in converting Canvas animations to video.",
        "main": "CanvasToVideo.js"
    }

With de-pre.js it will render like this:

{
    "name": "CanvasToVideo",
    "description": "An experiment in converting Canvas animations to video.",
    "main": "CanvasToVideo.js"
}

About

Removes excess indentation from the contents of pre tags, allowing proper indentation in HTML.

Resources

License

Stars

Watchers

Forks

Packages

No packages published