Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

markdown-it-plus-loader

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

markdown-it-plus-loader

Parse source as Markdown.

  • 0.3.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Weekly downloads
 
Created
Source

markdown-it-plus loader for webpack

Parses source as Markdown using the awesome markdown-it parser. And do some additional great stuff with it.

Notice: It's a fork!

This is a fork of the original markdown-it-loader. This one is made to allow a deeper access and control of the output.

Installation

$ npm install --save markdown-it-loader

Usage

Documentation: Using loaders

In your webpack.config.js file:

var subscript = require('markdown-it-sub');
var superscript = require('markdown-it-sup');

module.exports = {
  module: {
    loaders: [{
      test:   /\.md/,
      loader: 'markdown-it'
    }]
  },

  'markdown-it': {
    preset: 'default',
    typographer: true,
    use: [subscript, superscript]
  }
};

Options

All the options you pass through the markdown-it key are actually forwarded to markdown-it itself. There are, however, three exceptions:

  • use: A list of plugins that should be used.
  • preprocess: A function which gets the source to parse and an environment object. This very object is passed to markdown-it as well. A user may use this function to strip out front-matter and the like.
  • postprocess: This callback receives only the parser and environment object. It must return the finalized environment object, as that is the one which is set as the exports of the resulting JavaScript.

Signatures

function preprocess(MarkdownIt, Environment, Source) -> String

  • Context: Loader context function postprocess(MarkdownIt, Environment) -> Any
  • Whatever this function returns, becomes the module's module.exports property.
  • Context: Loader context

Meta

Contributors

License

Copyright (c) 2014 Daniel Perez Alvarez (unindented.org). This is free software, and may be redistributed under the terms specified in the LICENSE file.

Keywords

FAQs

Package last updated on 25 Nov 2015

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc