New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

marked-extensions

Package Overview
Dependencies
Maintainers
1
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

marked-extensions

Provides markdown extensions on top of the marked library, including:

  • 0.5.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-46.15%
Maintainers
1
Weekly downloads
 
Created
Source

marked-extensions

Provides markdown extensions on top of the marked library, including:

  • if/if-not markdown blocks
  • hide code language blocks based on active language
  • special doc syntax for writing documentation for multiple languages at once
  • Code line numbers
  • CodeMirror runMode integration
  • Mermaid integration
  • YAML meta data

Install

npm install marked-extensions --save

Usage

var { process } = require('marked-extensions');
var marked = require('marked');

var markdown = `
# @@docMethod:full_name(@@docParam:first_name, @@docParam:last_name)
```@doc
Parameters:
@@docParam:first_name @@docType:String - The first name
@@docParam:last_name @@docType:String - The last name

Return Value:
@@docType:String - The first and last name
```
`

var processed = process(marked, markdown, { language: 'javascript' });  

%method-doc

```%method-doc
{
    "method": "",
    "desc": "",
    "args": {
          "arg1": { "type": "", "desc": "" },
          "arg2": { "type": "", "desc": "" }
    },
    "returns": { "type": "", "desc": "" },
    "constraints": [
        ""
    ],
    "examples": [
        {"args": [], "returns": null },
        {"args": [], "returns": null }
    ],
    "examplesOnly": false, // set to true if you want to only show examples with no method doc
    "formatTypes": true, // defaults to true, set to false if you want to disable type formattings
    "languages": { // override a specific language
      "javascript": {
        "method": ""
      }
    }
}
```

FAQs

Package last updated on 18 Apr 2019

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